# Understanding Hypothesis Tests

Lesson Features »

Lesson Priority: VIP Knowledge

- Learn why hypothesis tests exist and what they are intended to do
- Define the Null Hypothesis and the Alternative Hypothesis
- Understand the concept of statistical significance
- Learn how test statistics are usually calculated and how they are used in hypothesis tests
- Know what the p-value result is and what it means
- Begin to understand the difference between measuring single populations and measuring the difference between two populations

Hands down, one of the most powerful tools in Statistics is inference testing, which gives us mathematical evidence of a hypothesis. This method is used in real world medical and science applications every single day. This introductory lesson will help us understand how hypothesis tests generally work, and how to use them appropriately.

Practice problems and worksheet coming soon!

## Judgement Day

- Proportions »
- Difference in Proportions »
- Means »
- Means from Unknown Distributions »
- Difference in Means »

## A First Example

If you've just seen hypothesis tests in class for the first time and feel overwhelmed, don't panic - you certainly aren't alone! Some of the details we eventually need to master make it harder to initially understand what the concept is all about.Let's look at a high level example.Hypothesis Test - First ExampleIn a very large metropolitan school district, parents and students have complained that at least $30 \%$ of school windows are significantly damaged and in need of replacement. The local government agrees to fund the replacement of all windows in all schools if this claim appears true.Since there are at least $100,000$ windows, it is impractical to test each one. Instead, they send out a surveyor in a simple random sample of $100$ windows. The survey was designed so that every window had an equal chance of being selected.The surveyor came back and found that 33 windows were damaged. The government needs to determine whether this result statistically suggests that more than $30 \%$ of all windows are truly damaged.Let's dissect this situation to understand and learn some important ideas and vocab.The ClaimThe most important part of understanding and setting up a hypothesis test is identifying the claim. Here, the claim is that at least thirty percent of all school windows are damaged.The HypothesisStatistical hypotheses are often viewed as backward from what you might expect, because we're always going to assume the claim is wrong unless there is evidence to suggest otherwise. This assumption is referred to as the null hypothesis, and is notated as an H (which stands for hypothesis) with a zero subscript: $H_{0}$.For this scenario, the null hypothesis will be that the true proportion of damaged school windows is less than $30 \%$:$$H_{0}: \;\; p < 30$$where $p$ represents the true proportion of damaged windows.Underneath a null hypothesis, we will always write down the alternative hypothesis. It will be the opposite of the null hypothesis mathematically. This hypothesis will represent the suspected claim, and is notated with an H and an A subscript: $H_{A}$ (some texts notate it as $H_{1}$ but you shouldn't lose points either way).For this scenario, the alternative hypothesis will be that the true proportion of damaged school windows is at least $30 \%$:$$H_{A}: \;\; p \ge 30$$## Significance Level

In any hypothesis test, we will choose how strong the evidence needs to be to convince us that we should doubt the null hypothesis. After all, if someone told you there was only a $50 \%$ chance that the claim was correct, you wouldn't have as much conviction in believing that claim as you would if someone told you there was a $99 \%$ chance that the claim is correct.Problems will often dictate this number to us, and it is usually $95 \%$. The way in which we state the required strength of evidence is with the probabilistic complement of the assurance likelihood, or $1$ minus the probability. For $95 \%$ assurance, we would be told to use $5 \%$ significance. This is referred to as the significance level.## Other Concepts

After a test is conducted, we often need to answer follow-up questions or further explain the results. The focus of this follow-up is the two types of mistakes that could be made, relative to the truth of the claim.Recall that earlier we pointed out that the truth is unknowable. We have a claim, and we conduct a probabilistic test using sample data, but we aren't able to know whether the claim is actually true or false - we only get to make a conclusion based on likelihood. Even if we can be $99.99 \%$ sure we know the truth, we can never be $100 \%$.This means that there are two types of errors that can be made in a hypothesis test, depending on the outcome.If we reject the null hypothesis based on the test results, meaning we believe the claim is true, it is possible that in reality, the claim is false. After all, we don't actually know the truth. This is always going to be a relatively small probability, and we refer to it as the probability of a Type I error.If we don't reject the null hypothesis, it is possible that the claim is true even though we do not have the statistical evidence to support it. The probability that this happens is referred to as the probability of a Type II error.The probability of making a Type I error is easy to find, because it is simply equal to the significance level. This will never be a mystery or a difficult number to find.We will learn and practice how to calculate Type II error probabilities in each specific hypothesis test lesson that follows. Type II probabilities are a nuisance to calculate, but while they are part of the syllabus and show up on tests, you'll still do well grade-wise if you can do everything else correctly, so don't lose heart if Type II errors become a challenge for you.We refer to the probability of a Type II error as $\beta$, and the probability $1-\beta$ is referred to as the power of the test because it tells us the probability that we correctly failed to reject the null hypothesis (i.e. the probability that we don't have evidence to support the claim, and at the same time the claim is false).## Final Vocab Recap

You should know the terms we discussed, including which errors Type I and Type II refer to. Additionally, you should know the symbols commonly used.I strongly recommend that you go over these somewhat quickly, and then revisit them once you've learned one or two specific types of hypothesis tests, such as proportion tests » or mean value tests ».ClaimA statement about a hypothesized state of being that we wish to obtain mathematical evidence about, to decide whether we believe it to be true or false.Null HypothesisDenoted $H_{0}$. This represents the baseline assumption that we have in the absence of the claim, or if the claim wasn't made, and therefore is the mathematical opposite of the claim.Alternative HypothesisDenoted $H_{A}:$. This represents the claim, which we will believe to be true if we find probability evidence against the null. It is the mathematical equivalent of the claim, and therefore the mathematical opposite of the null.Test StatisticDenoted $T_{\mathrm{stat}}$. This is a statistical value derived from the sample data we observed.Critical ValueThis is the maximum or minimum limit that we use to determine whether the test statistic is too extreme, dependent on the significance level. If it is, the p-value will be small and we will reject the null hypothesis.Significance LevelThis measures how strong we desire the evidence against the null hypothesis to be before saying it is strong enough to reject the null hypothesis. Often denoted $\alpha$, this is a given value and is usually $0.05$.p-valueThis is a measure of the likelihood of observing the test statistic, given that the null hypothesis is true. In other words, it is the probability that we would have observed the sample data that we observed, if the null was true. We reject the null if this value is less than the critical value.Type I ErrorThis occurs when we mistakenly reject the null hypothesis. The probability of a Type I error is equal to the significance level, $\alpha$.Type II ErrorThis occurs when we mistakenly fail to reject the null hypothesis. The probability of a Type II error is $\beta$, and we'll learn how to calculate it in future lessons on specific types of tests.Power of the TestThis is $1-\beta$, and represents the probability that we correctly accepted the null hypothesis.## Put It To The Test

Each of the following examples are focused on the setup and drawing conclusions based on the general ideas of hypothesis tests. Try to answer each question, and remember that many students find it helpful to revisit these concepts after working on actual tests that you'll execute in the following lessons.- Know what a hypothesis test is and what it is intended to do
- Be able to identify a claim in a problem, and write the corresponding null and alternative hypotheses
- Begin to understand the specific evidence-based process of rejecting or not rejecting the null hypothesis
- Be familiar with the terms we use to describe the conclusion of a hypothesis test, and what they mean
- Remember the difference between Type I and Type II errors, and be able to state their meaning in context

- Popular Content
- Get Taught
- Other Stuff