[Math] Hypothesis testing without sample mean and standard deviation

hypothesis testingstatistics

Suppose we're looking at a two-candidate mayoral race in Providence. Candidate A is declared winner with 55 percent of the vote (p(hat) = 0.55). However, candidate B is suspicious of these results. Having his group of close friends take a random sample of 17 voters from Providence, he finds that 7 voted for candidate A while 10 voted for him.

On the basis of this study performed at the alpha = 0.05 level of significance, should candidate B demand a recount?

Formulate the null and alternative hypothesis and perform the test in order to respond to this question.

For hypothesis testing, I only know how to solve these problems if we have 4 parameters: Xn the sample mean, u the population mean, sd the standard deviation and n the sample size. But here I don't have the sample mean nor the standard deviation. What is the formula used to find the normal distribution t given a 95% confidence interval when doing hypothesis testing when n is not large? Since we don't have the sample mean nor the standard deviation, what is the process of hypothesis testing here?

H0: u = 0.55

H1: u < 0.55 since p = 7/14 = 0.41

z = p(hat) – p / sqrt(p(1-p)/n) = 0.55 – 0.41 / sqrt(0.41(1-0.41)/17) = 1.17

p(z < 1.17) = 0.879
p(z > 1.17) = 1 – 0.879 = 0.123

Since 0.123 > 0.05, we don't reject the null hypothesis and candidate B shouldn't demand a recount.

Is this correct?

Best Answer

What you're referring to — needing to know the sample mean and standard deviation in order to perform hypothesis testing — is only appropriate for a quantitative random variable, i.e. one that has numerical values (e.g., average height of a group of people). But this is an entirely different context of a categorical random variable. There's no sense of talking about sample means here because our sample doesn't consist of numbers. Our sample consists of people's responses to the voting question: some people responded "A" and some people responded "B". What we're interested in here is estimating the proportion of people who gave a certain response. And you have all the data that you need to perform hypothesis testing in this example for the population proportion in a sample.

Quick online search gives a lot of links on the subject. For example, the following seem to be nicely written (but of course, there are hundreds more resources out there):

  • This one or this one explain the difference between categorical and quantitative random variables;

  • And here you can find a step-by-step explanation with an example of hypothesis testing for population proportions.

Related Question