Test statistic (z-score)

    Understanding the Test Statistic (z-score) for Proportions

    In AP Statistics, when conducting inference for categorical data, specifically proportions, the test statistic is a crucial component. For tests involving a single proportion or the difference between two proportions, this test statistic often takes the form of a z-score. This z-score quantifies how many standard deviations an observed sample statistic (like a sample proportion or difference in proportions) is away from the hypothesized population parameter, assuming the null hypothesis is true.

    Formula for a Single Population Proportion

    When testing a hypothesis about a single population proportion (p), the z-score test statistic is calculated as:

    • $$z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$$

    Where:

    • \(\hat{p}\) is the sample proportion (observed value).
    • \(p_0\) is the hypothesized population proportion from the null hypothesis (e.g., if \(H_0: p = 0.5\), then \(p_0 = 0.5\)).
    • \(n\) is the sample size.
    • The denominator, \(\sqrt{\frac{p_0(1-p_0)}{n}}\), is the standard deviation of the sampling distribution of \(\hat{p}\) under the null hypothesis. It's important to use \(p_0\) here, not \(\hat{p}\), because we are calculating how unusual the observed \(\hat{p}\) is if \(H_0\) were true.

    Example: A company claims 70% of its customers are satisfied. A sample of 100 customers finds 65 satisfied. To test if the true proportion is less than 0.70, \(\hat{p} = 0.65\), \(p_0 = 0.70\), \(n = 100\). The z-score would be calculated using these values.

    Formula for the Difference Between Two Population Proportions

    When comparing two population proportions (\(p_1\) and \(p_2\)), the z-score test statistic is calculated as:

    • $$z = \frac{(\hat{p}_1 - \hat{p}_2) - (p_1 - p_2)_0}{\sqrt{\hat{p}_c(1-\hat{p}_c)(\frac{1}{n_1} + \frac{1}{n_2})}}$$

    Where:

    • \(\hat{p}_1\) and \(\hat{p}_2\) are the sample proportions from the two groups.
    • \((p_1 - p_2)_0\) is the hypothesized difference in population proportions from the null hypothesis. In most cases, \(H_0: p_1 = p_2\), so \((p_1 - p_2)_0 = 0\).
    • \(n_1\) and \(n_2\) are the sample sizes for the two groups.
    • \(\hat{p}_c\) is the pooled sample proportion, calculated as \(\hat{p}_c = \frac{X_1 + X_2}{n_1 + n_2}\), where \(X_1\) and \(X_2\) are the number of successes in each sample. This pooled estimate is used in the standard error when the null hypothesis assumes \(p_1 = p_2\). This pooling provides a better estimate of the common population proportion under the null hypothesis.
    • The denominator is the standard deviation of the sampling distribution of the difference in sample proportions under the null hypothesis.

    Example: A study compares the effectiveness of two medications. Medication A cures 70 out of 100 patients, and Medication B cures 60 out of 100 patients. To test if there's a significant difference in cure rates, \(\hat{p}_1 = 0.70\), \(\hat{p}_2 = 0.60\), \(n_1 = 100\), \(n_2 = 100\). The pooled proportion \(\hat{p}_c = (70+60)/(100+100) = 130/200 = 0.65\). These values are then plugged into the formula.

    Interpretation

    The magnitude of the z-score indicates the strength of the evidence against the null hypothesis. A larger absolute value of z suggests that the observed sample statistic is more unusual under the assumption that the null hypothesis is true. This z-score is then used to find a p-value, which is the probability of observing a sample statistic as extreme as, or more extreme than, the one observed, assuming the null hypothesis is true.

    Practice questions

    1

    What is the primary purpose of calculating a z-score test statistic in hypothesis testing for proportions?

    2

    When testing a single population proportion, why is the hypothesized proportion (p₀) used in the standard error calculation for the test statistic, rather than the sample proportion (p̂)?

    3

    For a two-sample z-test for the difference in proportions, what is the role of the pooled sample proportion (p̂c) in the test statistic formula?

    4

    If a calculated z-score test statistic for a proportion is 2.5, what does this value signify?

    Practice more free →

    Free AP4U account — unlimited practice, AI grader, and progress tracking.

    Canonical: https://apforu.com/ap/statistics/unit-6-inference-for-categorical-data-proportions/test-statistic-z-score