# 9.1.2.1.1 – Example: Ice Cream

## Example: Ice Cream Section

The Creamery wants to compare men and women in terms of preference for eating their ice cream out of a cone to determine if there is a gender difference. They take a sample of 500 customers (240 men and 260 women) and ask if they prefer cones over bowls. They found that 124 men preferred cones and 90 women preferred cones.

1. Check any necessary assumptions and write hypotheses.

$$H_0: p_m - p_f = 0$$

$$H_a:p_m - p_f \ne 0$$

$$n_m \widehat p_m = 124$$

$$n_m (1-\widehat p_m) = 240 - 124 = 116$$

$$n_f \widehat p_f = 90$$

$$n_f (1-\widehat p_f) = 260-90 = 170$$

These counts are all at least 10 so we can use the normal approximation method.

2. Calculate an appropriate test statistic.
Pooled Estimate of $$p$$
$$\widehat{p}=\frac{\widehat{p}_1n_1+\widehat{p}_2n_2}{n_1+n_2}$$

$$\widehat{p}=\frac{124+90}{240+260}=\frac{214}{500}=0.428$$

Standard Error of $$\widehat{p}$$
$$SE_{0}={\sqrt{\frac{\widehat{p} (1-\widehat{p})}{n_1}+\frac{\widehat{p}(1-\widehat{p})}{n_2}}}=\sqrt{\widehat{p}(1-\widehat{p})\left ( \frac{1}{n_1}+\frac{1}{n_2} \right )}$$

$$SE_{0}=\sqrt{0.428(1-0.428)\left ( \frac{1}{240}+\frac{1}{260} \right )}=0.04429$$

Test Statistic for Two Independent Proportions
$$z=\frac{\widehat{p}_1-\widehat{p}_2}{SE_0}$$

$$z=\frac{\frac{124}{240}-\frac{90}{260}}{0.04429}=3.850$$

3. Determine the p-value associated with the test statistic.

This is a two-tailed test. Our p-value will be the area of the $$z$$ distribution more extreme than $$3.850$$.

$$p = 0.0000591 \times 2 = 0.0001182$$

4. Decide between the null and alternative hypotheses.

$$p \le 0.05$$

Reject the null hypothesis

5. State a "real world" conclusion.

There is evidence that the proportion of men who prefer cones is different from the proportion of women who prefer cones in the population.