When asked, people often provide weights that are somewhat lower than their actual weights, and they also tend to round their answers to the nearest ten or five. Researchers conducting a study of students' weights were concerned that the sample data they obtained may have been reported weights instead of actual, measured weights. If this were the case, the last digits of the weights would not occur with the same frequency.
The table below summarizes the last digit of weights of 80 randomly selected students. Use this information to conduct a goodness-of-fit test on the claim that the last digits do not occur with the same frequency. Use a 0.05 level of significance.

Last Digit Frequency
0 15
1 5
2 3
3 8
4 5
5 17
6 7
7 6
8 9
9 5

Solution

The observed data is

Last Digit Obs. Freq.$(O)$ Prop.
0 15 0.1
1 5 0.1
2 3 0.1
3 8 0.1
4 5 0.1
5 17 0.1
6 7 0.1
7 6 0.1
8 9 0.1
9 5 0.1
Step 1 Setup the hypothesis

The null and alternative hypothesis are as follows:

$H_0:$ The last digits of the weights occur with same frequency.

$H_1:$ The last digits of the weights do not occur with same frequency.

Step 2 Test statistic

The test statistic for testing above hypothesis is

$$ \begin{equation*} \chi^2= \sum \frac{(O_{i} -E_{i})^2}{E_{i}} \sim \chi^2_{(k-1)}\\ \end{equation*} $$

Step 3 Level of Significance

The level of significance is $\alpha =0.05$.

Step 4 Critical value of $\chi^2$

The level of significance is $\alpha =0.05$. Degrees of freedom $df=k-1=10-1 =9$.

chi-square critical region 0.05
chi-square critical region 0.05

The critical value of $\chi^2$ for $df=9$ and $\alpha=0.05$ level of significance is $\chi^2 =16.919$.

Step 5 Test Statistic

The expected frequencies can be calculated as

$$ \begin{equation*} E_{i} =N*p_i \end{equation*} $$

For example, $E_{1}$ is given by

$$ \begin{eqnarray*} E_{1} & = &N*p_1\\ &=& 80*0.1\\ &=&8. \end{eqnarray*} $$

Last Digit Obs. Freq.$(O)$ Prop. $p_i$ Expe.Freq.$(E)$ $(O-E)^2/E$
0 15 0.1 8 6.125
1 5 0.1 8 1.125
2 3 0.1 8 3.125
3 8 0.1 8 0.000
4 5 0.1 8 1.125
5 17 0.1 8 10.125
6 7 0.1 8 0.125
7 6 0.1 8 0.500
8 9 0.1 8 0.125
9 5 0.1 8 1.125

The test statistic is

$$ \begin{eqnarray*} \chi^2&=& \sum \frac{(O_{i} -E_{i})^2}{E_{i}} \sim \chi^2_{(k-1)}\\ &=&\frac{(15-8)^2}{8}+\cdots + \frac{(5-8)^2}{8}\\ &=& 6.125 +\cdots + 1.125\\ &=& 23.5. \end{eqnarray*} $$

Step 6 Decision (Traditional approach)

The test statistic is $\chi^2 =23.5$ which falls $inside$ the critical region bounded by the critical value $16.919$, we $\textit{reject}$ the null hypothesis.

OR

Step 6 Decision ($p$-value approach)

The p-value is $P(\chi^2_{9}>23.5) =0.00517$.

As the p-value $0.0052$ is $\textit{less than}$ the significance level of $\alpha = 0.05$, we $\textit{reject}$ the null hypothesis.

There is sufficient evidence to support the claim is that the last digits of the weights do not occur with same frequency.

Further Reading