In: Statistics and Probability
You hypothesize that, when both a man and a woman are in the front seat of a car, the man is more likely to be driving than the woman.
The null hypothesis is that the man and the woman are driving equally often or the woman is driving more often.
You decide to test the hypothesis by observing 20 cars with both a man and a woman in the front, and counting how many of those have a man driving.
Say that men are really driving 70% of the time. Using a one tailed test at α= .05, how many men have to be driving in order for you to be able to reject the null hypothesis? (In other words, at least what number of cars must be driven by men for you to reject the null?)
This is a problem of testing proportion.
Let p1 and p2 be the proportion of men and women driving the car respectively, when both of them are sitting in the front seats.
So, p1 = 1 - p2
We are hypothesizing that when both a man and a woman are in the front seat of a car, the man is more likely to be driving than the woman using the null hypothesis that the man and women are driving equally often or the women is driving more often.
When they are eqully likely to drive, the proportion would be equal for both men and women. In such case -
p1 = p2 = 0.5.
As the null hypothesis should be man and woman driving equally often or women driving more often, so -
The Null Hypothesis - H0 : p1\leq 0.5, and
Alternate Hypothesis - H1 : p1 > 0.5.
Now we are observing a sample of 20 cars with both a man and a woman in the front. We observe that men are really driving 70% of the time.
So, \overline{p_{1}} = 0.7, hence \overline{p_{2}} =0.3
The test statistic of testing is given by -
Z = \frac{\overline{p_{1}} - p_{1}}{\sigma}
where, {\sigma} is the standard deviation given by -
{\sigma} = \sqrt{\frac{p_{1}(1-p_{1})}{n}}
In the given question we have, n = 20 and p1 = 0.7, so -
{\sigma} = \sqrt{\frac{0.7(1-0.7)}{20}} = \sqrt{\frac{0.7\times 0.3}{20}} = \sqrt{\frac{0.21}{20}} = \sqrt{0.0105}
so, the standard deviation is = \sigma = 0.10246951
So, the test statistic will be -
Z = \frac{0.7-0.5}{0.10246951} = 1.9518
As it is a one tailed test, the probability for Z = 1.9518 obtained from the standard normal distribution table is -
P(Z = 1.9518) = 0.025481
As, the calculated p-value is smaller than the required level of significance \alpha =0.05, so we will reject the null hypothesis and conclude that the proportion of men driving the car when both men and women are sitting in front seats is greater than 0.5.
The power of a statistical hypothesis test is nothing but the probability of correctly rejecting null hypothesis, given alternate hypothesis is true or in other words, probability of correctly accepting the alternate hypothesis, given alternate hypothesis is true.
It is written as -
Power = P(Reject H0 | H1 is true) = P(Accept H1 | H1 is true).
To find the power, we will first need to calculate the confidence interval of the population proportion.
The confidence interval can be obtained using the formula -
CI = (\overline{p_{1}}) \pm Z_{\alpha}(\sigma)
where Z is the one tailed value at significance level \alpha = 0.05. From the standard normal table, we get this value as - Z = 1.645
So, CI = (0.7 )\pm1.645(0.10246951) = 0.7\pm 0.1685
Hence, the confidence interval of the population proportion = (0.5315, 0.8685)
So until and unless the hypothesized value of the proportion lies in the given interval, we will not accept the null hypothesis. But the value of population proportion lying above the upper bound i.e. 0.8685 is also acceptable for accepting alternate hypothesis. So, we will consider the interval (0.5315, 1) for calculating power of test. So, the probability that our hypothesized value '0.5' lies in this interval is -
P = P(Z = \frac{1-0.5}{0.10246951}) - P (Z = \frac{0.5315-0.5}{0.10246951})
\Rightarrow P = P(Z=4.8795) - P(Z=0.3074)
So, P = 1 - 0.6217 = 0.3783.
So, the power of the test = 1 - P = 0.6217.