The University
of Western Sydney
Nature of Data
301114
Assignment
Tharunn Kumar Sundar
19256854

1
1.
Australian Prisoners
The following table shows the number of prisoners in Australian prisons in 2014, broken down
by age group and gender. Is there evidence that the age distribution differs by gender? Make
an appropriate plot of the data.
Males
Females
19 years and under
1920
20 to 24 years
3684
316
25 to 29 years
5624
475
30 to 34 years
4907
483
35 to 39 years
4109
404
40 to 44 years
3756
349
45 to 49 years
2808
234
50 to 54 years
1541
135
55 to 59 years
975
60 to 64 years
595
65 years and over
681
65
72
32
27

School of Computing, Engineering and Mathematics
Date : 24-05-2018
Plot
:
Plot 1

School of Computing, Engineering and Mathematics
Date : 24-05-2018
2
Plot 2

School of Computing, Engineering and Mathematics
Date : 24-05-2018
3
Plot 3
Observations from plot:[H1]
It can be seen from plot 1 that the number of male and female in the sample are very different
but the distribution pattern seems to look the same. For further investigation, we normalize the
data into percentages and view in a stacked bar plot [plot 2]. It has be seen from plot 2 that the
distribution is different but the representation isn’t very clear so we switch to a grouped bar
plot shown in plot 3. Plot 3 clearly shows that the distribution is different. From the plot 3 we
can assume we are going to accept H1.
Analysis and Results:
The data is represented into R and chi square test is conducted and the p-value calculated is
0.0004998 which is less than 0.05. so we reject the null hypothesis.

School of Computing, Engineering and Mathematics
Date : 24-05-2018
4
Conclusion:
Since the observed p-value is less than 0.05, we can reject the null hypothesis and accept the
alternative hypothesis H
1
[Age distribution of the prisoners differs by gender].