In: Statistics and Probability
to determine whether the method of using herion has changed in Years you use data collected in1980 and again in 2015 as part of an annual survey of arrested drug users. in 1980 you find that 73% of heroin users injected the drug, 12% smoked it, and 15% snorted it. the data from 2015 which were collected from a sample of 500 heorin users, are below. assume you want to test whether the null hypothesis that there has been no change in the distribution of responses in 1980 to 2015 at alpha=0.5
2015 data: injection 330
smoke:80
snort:90
total:500
Solution
The solution is based on Chi-square Test for Goodness of Fit.
Let Oi be the 2015 dat and Ei be the 1980 data
Claim: There has been no change in the distribution of responses in 1980 to 2015
Hypotheses:
Null: H0: 2015 data are in accordance with the 1980 percentages
Vs
Alternative HA: H0 is false
Test Statistic:
χ2 = ∑[i = 1,k]{(Oi - Ei)2/Ei} = 13.0229
Under H0, Ei follow the percentages of 1980
With the above terminology, χ2cal = [Details of calculations follow at the end]
Distribution, Significance Level, α, Critical Value, p-value
Under H0, χ2 ~ χ2k – s, Chi-square distribution with degrees of freedom = k – s,where k = number of classes
and s = number of parameters estimated.
Here, k = 3 and s = 0 since the 1980 percentages are given and hence there is no need for estimation.
p-value = P(χ2k – s > χ2 cal)
Given significance level = α , critical value = χ2crit = upper α% of χ2k - s, α = 7.8147
p-value = 0.0046
Critical value and p-value are obtained using Excel Function: Statistical CHIINV and CHIDIST
Decision
Since, χ2cal > χ2crit, or equivalently, since p-value < α, H0 is rejected.
Conclusion
There is not sufficient statistical evidence to conclude that the claim is valid and hence
we conclude that here has been change in the method of using heroin from 1980 to 2015. ANSWER
Calculation Details
Heroin usage method |
Injection |
Smoke |
Snort |
Total |
|||||||||
Oi - 2015 data |
330 |
80 |
90 |
500 |
|||||||||
pi = 1980 % in decimal form |
0.73 |
0.12 |
0.15 |
1 |
|||||||||
Ei = 500 x pi |
365 |
60 |
75 |
500 |
|||||||||
χ2 |
3.3561644 |
6.6666667 |
3 |
13.0229 |
|||||||||
CHECK: ΣOi = ΣEi. |
Done |
K = |
3 |
S = |
0 |
α = |
0.05 |
||||||
χ2cal = |
13.0229 |
DF = |
3 |
χ2crit = |
7.8147 |
p-value = |
0.0046 |
||||||
DONE