Michelle V. answered 07/28/23
Certified Graduate Statistician, American Statistical Association
Background
To understand this question better, let's make this problem more concrete. For example, our observations could represent the total number of students surveyed when conducting a poll of college students. These surveyed students are a sample taken from an overall population of all college students. A "success" might be defined as occurring when a student is female. In our sample, we have n = 681 observations and 335 successes. So our sample proportion of students who are female would be 335/681 or approximately 0.49.
A sample proportion is almost always different from the true population proportion due to random noise in the data. If you're conducting a survey of college students, your might by random chance happen to survey a few more or less female college students than you would find if you counted every college student in existence. The test statistic allows us to determine how likely we are to observe our calculated sample proportion of 0.49 if the true population proportion is equal to 0.46 (the null hypothesis).
The binomial distribution is the probability distribution that describes the behavior of a binary random variable (a variable that can take on two values, such as male and female). However, at large sample sizes, the normal distribution (a bell curve) is a good approximation of the binomial distribution. We prefer the normal distribution because it is much easier to work with mathematically than the binomial distribution.
The continuity correction factor is a way to correct for the fact that the binomial distribution and normal distribution are different for data with a small sample size. However in this case, we have n = 681 which is plenty large enough for the normal distribution to be a good approximation of the binomial distribution and also large enough that we can omit the continuity correction factor because it's impact would be so minimal.
Calculating The Test Statistic
Since we've established that we can use the normal distribution with no continuity correction factor, we can use a standard z-test for a proportion to test the likelihood of observing a sample proportion of around 0.49 when the true population proportion is 0.46.
For some notation here, n is the sample size, phat is the sample proportion, p is the true population proportion, and p0 is the hypothesized population proportion. We first calculate a z-score using the equation:
z = (phat - p0) / (√(p0 (1 - p0) / n)
It can be difficult to read equations on Wyzant, so note that we are taking the square root of the entire (p0 (1 - p0) / n). This z-score is our test statistic. So for our problem the test statistic is:
z = (335/681 - 0.46) / (√0.46 (1 - 0.46) / 681) ≈ 1.67
Calculating The P-Value
The p-value is the probability of observing our test statistic z or a more extreme test statistic if the null hypothesis (p=0.46) were true. Since our alternate hypothesis allows the true population proportion to be either greater than or less than 0.46 we are conducting a two-tailed hypothesis test. This means we are interested in the probability of observing a test statistic as extreme or more extreme than the one we calculated from our sample data. I.e., the probability of getting a test statistic as far away or further away from the mean of the test statistic distribution that would exist if the null hypothesis were true. The direction further away from the mean, smaller or larger, doesn't matter for a two-tailed test.
We need to look up probabilities in a z-score table. The z-score table lists the probabilities of observing a test statistic less than or equal to the specified value given our null hypothesis. To get a p-value in a two-tailed test, we'll add together the probability of observing a test statistic greater than or equal to 1.67 (the right-hand tail) and the probability associated of observing a test statistic less than or equal to -1.67 (the left-hand tail). For the left-hand tail, we can directly use the value in the z-score table. For the right-hand tail, we need to get the probability of observing a value greater than the specified z-score value, so we subtract the value in the table from 1. In our equation below, capital P represents a probability.
P-value = P(z ≥ 1.67) + P(z ≤ -1.67) = 0.04746 + (1 - 0.9525) = 0.09496
Since our specified significance level is α = 0.02 and our p-value is larger than this significance level, we fail to reject the null hypothesis. We cannot rule out the possibility that the true population proportion is 0.46 given the data set we observed.