155k views
4 votes
In a sample of 120 randomly selected people in City A, 5% prefer eating salad after the main course. In a sample of 120 randomly selected people in City B, 8% prefer eating salad after the main course. Check that the conditions are met for a hypothesis test to compare the population proportion of people that prefer eating salad after the main course in City A to the proportion in City B.

User Pricey
by
6.6k points

1 Answer

2 votes

Answer:

There is no enough evidence that the proportions are different.

Explanation:

We have to perform a hypothesis test on the difference of proportions.

In this case, the sample size is equal.

The null and alternative hypothesis are


H_0: \pi_1=\pi_2\\\\ H_1: \pi_1\\eq\pi_2

The significance level is assumed to be 0.05.

The weighted average p, as the sample sizes are the same, is the average of both proportions:


p=(p_1+p_2)/(2) =(0.05+0.08)/(2)=0.065

The standard deviation is


s=\sqrt{(2p(1-p))/(n) } =\sqrt{(2*0.065(1-0.065))/(120)} =0.032

The z-value for this sample is:


z=(p_1-p_2)/(s) =(0.05-0.08)/(0.032) =-0.9375

The P-value for z=-0.9375 is P=0.3485.

The P-value (0.35) is greater than the significance level (0.05), so the null hypothesis is failed to reject.

There is no enough evidence that the proportions are different.

In a sample of 120 randomly selected people in City A, 5% prefer eating salad after-example-1
User DSway
by
6.7k points