Hypothesis Testing Part 1: The Basic Idea and Need

The Basic Idea:

Making decisions based on hypothesis testing is different from the way that we typically make decisions. You’re probably most familiar with making decisions based on what is more or less likely to be true. For instance, if you want to decide which route to take to get from your location to another destination, you probably just make your choice based on what is most likely going to get you there quickest or with the least amount of gas or something. If you want to decide which hotel to stay in on a vacation, you probably just make your choice based on what is most likely going to be the best value for your money or give you the most pleasurable experience on your vacation. However, this type of reasoning and decision making is not always the best logic to use. What if you are making a decision where there is already a well established solution to the problem, but you think you’ve found a better solution. In this situation, the cost of deviating from the established answer is very great. So, do you go with the new solution that you’ve found because you have evidence that it’s better, or do you go with the established solution? Well let’s say that you work for a company and they have a business model that has been successful for years. The company is doing well with this established business model. Now, you have been doing some work and you have come up with a different business model that requires the company you work for to source the material they use to make their product from another supplier and use a different marketing strategy. When you present your idea to your bosses, they do some calculations and they find that there is a 60% chance of your new business model working at least as good as you predicted. In other words, it’s more likely to succeed than fail. So do they go with your new business model? Hopefully not. They already have a business model that they know works well. So even though your new plan has a greater chance of working than not working, the consequences of it not working are so high (massive potential losses to the company) that in order to go through with that alternative business plan, you would need to be overwhelmingly confident that it will be as successful as planned. Therefore, your bosses will tell you to get some contracts in place from the other businesses and do more market research, because they’ll only go with your new plan if there is a 99% chance of it working at least as good as you say.

This is where a hypothesis test comes into play. You have a well-established fact already. You think that well-established fact is actually not true, or maybe it was true in the past, but you think it isn’t true anymore. In order to establish a new well-established truth, you need to gather overwhelming evidence that the old well-established truth is not actually true. In inferential statistics, the well-established truth is some population parameter. In other words, we have some established belief about the population mean, proportion, standard deviation, etc. In order to gather the evidence that a population parameter is different from an established value, we take a sample from that population and calculate some statistics based on the sample. Then we ask the question, how likely are we to see the difference between the sample statistic that we see in this sample data and the population parameter (or even more severe) assuming that the population parameter is actually the well-established value? If that probability is low enough, we would say, “because the probability of us observing sample data as severe or even more severe than we did assuming that the population parameter is the established value is so low, we can conclude that the assumed population parameter is not correct.”

Why Do We Need Hypothesis Tests at All?

Let’s say that we are trying to disprove the long-held and well-established “fact” that the mean height of a population of people is 68 inches. In order to disprove this fact, we take a simple random sample of 50 people from this population and find the mean height of people in that sample who came from the population of interest. Let’s say that when we do that, we find that the sample average is 66 inches. That’s different from the expected value of 68 inches. So case closed, right? If you think about it for a few minutes, you would see that this reasoning is flawed. First of all, if you told me you took a sample of 50 people and the average of that sample turned out to be EXACTLY the average of the population it came from, that would already sound fishy. Although it makes sense for the expected value of the sample average to be the true average of the population, you should also realize that the probability that a sample average is that EXACT value would be fairly low. Think of another example that may illustrate the example better. Imagine a friend tells you that they flipped a fair coin (50% chance of heads, 50% chance of tails on any given flip) 50 times and got EXACTLY 25 heads and 25 tails. Does that seem odd to you? It should. You definitely would expect a given sample of 50 coin flips to result in close to 25 heads and 25 tails, but to be those exact numbers would be fairly unlikely.

Now let’s get back to the example with the average heights. The fact that we have a sample of 50 people with a mean of 66 inches assuming that the true mean of heights in the population that this sample came from is 68 inches doesn’t seem that odd or rare. The reasoning for this is the inherent variability of any sample. In our sample of 50 people with a sample average of 66 inches, it’s possible that more of those 50 people are shorter than the average than usual. Is it possible that you take a simple random sample from this population and get a few shorter people than you normally would expect? So how do we ever dispute the assumption that the true mean of the population is 68 inches? Two things become important: 1) the size of the difference in the population parameter and its associated statistic in the sample and 2) the inherent variability of the associated sample statistic.

If the size of the difference between the population parameter and the associated sample statistic is very large, we can say that is fairly unlikely to occur if the population parameter is what we assumed it is. In other words, in the example with the heights, if we assume the true mean heights in the population is 68 inches and we take a simple random sample of 50 people with a sample average height of 60 inches, that large of a difference is probably unlikely. Likewise, think of the coin flip example. If your friend claims they have a fair coin, and then they flip the coin 50 times with only 2 heads coming up and 48 tails coming up, that difference in observed sample proportion of 4% heads is different enough from the assumed population proportion of 50% heads that we will be more confident in saying the coin is not a fair coin.

The inherent variability of the sample means also needs to be considered in determining how likely or unlikely a given sample mean is based on the assumed population mean. For means, this variability is directly tied to the variability of heights in the population. We were just saying that a sample mean height of 60 inches in a sample consisting of 50 people appears to be significantly different from the expected value of 68 inches. So much so, that we would maybe conclude that the true mean height in the population is not the 68 inches we’ve been assuming. But wait. What if I tell you that the population we are talking about only consists of dwarves and giants. In other words, we’re assuming the mean height in the population is 68 inches, but no one in the population is really anywhere near this exact height. Everyone’s height is either very much shorter than 68 inches or very much taller than 68 inches. Now does this 8 inch difference between the sample mean height and the assumed true mean height seem that significant? Not really. Now we can see that we are fairly likely to get a sample mean of 60 inches in a sample size of 50. It just means that we have a slightly higher proportion of the dwarves in our sample than giants. In a population that consists of approximately equal proportions of dwarves and giants, you would expect to get a sample of size 50 with a slightly higher proportion of one group than the other fairly often. So knowing that the heights in the population are highly variable, this sample mean of 60 inches doesn’t seem so unlikely or rare any more.

So how do we account for these two different effects (the size of the difference between the sample statistic and the assumed population parameter, and the inherent variability of the the sample statistic) in order to determine whether an observed outcome in the sample data is unlikely enough to say that the assumed value of the population parameter is incorrect? It turns out that under certain conditions that we’ll talk about in the next post, the sample statistics follow well-defined probability distributions (these are called sampling distributions) and we can actually calculate the probability that we would take a sample with the observed statistic assuming that the population parameter is the assumed value. If that probability ends up being very low, in other words, there is a low probability that we would get a sample statistic that is so far away from the expected value, then we can conclude that the expected value that we assumed we should be getting is not accurate. In the next post, we’ll discuss the actual math and probability calculations that you can do to determine these probabilities which are called p-values.

Summary:

In summary, hypothesis tests are a way of making a decision when you have some pre-existing established value for the parameter of some population, and you think this established value is not correct. Instead of just calculating what’s more likely (that the population parameter is the value assumed or if it’s not), we only claim to have enough evidence to conclude that the population parameter is not the established value if there is overwhelming evidence that it is not that value. To do this, you assume the population parameter is that established value. Then, you take a sample from the population of interest and calculate a statistic from the sample that estimates the population parameter. Next, you ask yourself the question, “How likely is it that I would get a sample statistic that is as far away from the assumed population parameter (or even further away) assuming that the population parameter is the established value?” If the likelihood or probability of getting sample data as severe or more severe than you did is small enough assuming that the population parameter is the established value, you would conclude that the population parameter is not what you’re assuming it to be. In order to calculate this probability or likelihood that we keep referring to, we need to be able to establish the probability distributions that sample statistics follow under certain conditions. This is what we’ll talk about in the next post.

Comments

Leave a Reply