In: Statistics and Probability
It has been claimed that, for a penny minted in 1999 or earlier, the probability of observing heads upon spin- ning the penny is p = 0.30. Three students got together, and they would each spin a penny and record the num- ber X of heads out of the three spins. They repeated this experiment n = 200 times, observing 0, 1, 2, and 3 heads 57, 95, 38, and 10 times, respectively.
You have n = 200 data points: 0 appears 57 times, 1 appears 95 tmes, 2 appears 38 times and 3 appears 10 times. Test the hypothesis that this data came from binomial distribution. (Here you need to estimate the parameters of the binomial first.)
Null hypothesis :Ho : The data came from binomial distribution
Alternate hypothesis :H1 : The data did not come from binomial distribution
Given,
X : Number of Heads when a penny is tossed
Observed Frequency:
X | O: Observed Frequency |
0 | 57 |
1 | 95 |
2 | 38 |
3 | 10 |
As the penny tossed for 3 times ; n= 3
Probability of observing heads upon spinning the penny is p = 0.30
q = 1-p = 1-0.3=0.7
X : Number of Heads when a penny is tossed;
X binomial distribution with p = 0.3 and n= 3 with probability mass function
Expected frequency = Number of times the experiment conducted x P(X=x)
E = 200P(X=x)
x | P(x) | P(x) | E= 200*P(x) |
0 | 0.3430 | 68.6 | |
1 | 0.4410 | 88.2 | |
2 | 0.1890 | 37.8 | |
3 | 0.0270 | 5.4 |
Test Statistic :
O | E | O-E | (O-E)2 | (O-E)2/E |
57 | 68.6 | -11.6 | 134.56 | 1.9615 |
95 | 88.2 | 6.8 | 46.24 | 0.5243 |
38 | 37.8 | 0.2 | 0.04 | 0.0011 |
10 | 5.4 | 4.6 | 21.16 | 3.9185 |
Total | 6.4054 |
Degrees of freedom = 4-1 =3
Level of significance = 0.05
As p-Value : 0.0934 > Level of significance: 0.05 . Fail to reject null hypothesis.
Hence Conclude that this data has come from Binomial distribution.
p-value is computed using excel function
CHISQ.DIST.RT(6.4054,3) = 0.0934
CHISQ.DIST.RT function
Returns the right-tailed probability of the chi-squared distribution.
The χ2 distribution is associated with a χ2 test. Use the χ2 test to compare observed and expected values. For example, a genetic experiment might hypothesize that the next generation of plants will exhibit a certain set of colors. By comparing the observed results with the expected ones, you can decide whether your original hypothesis is valid.
Syntax
CHISQ.DIST.RT(x,deg_freedom)
The CHISQ.DIST.RT function syntax has the following arguments:
X Required. The value at which you want to evaluate the distribution.
Deg_freedom Required. The number of degrees of freedom.