**Contents** (Click to skip to the section):

- Critical Values (new page — opens in new window)
- Hypothesis Testing
- What is a Hypothesis?
- What is Hypothesis Testing?
- Hypothesis Testing Examples (One Sample Z Test).
- Hypothesis Test on a Mean (TI 83).
- Bayesian Hypothesis Testing.
- More Hypothesis Testing Articles

## Hypothesis Testing

The main purpose of statistics is to test a hypothesis. For example, you might run an experiment and find that a certain drug is effective at treating headaches. But if you can’t repeat that experiment, no one will take your results seriously. A good example of this was the cold fusion discovery, which petered into obscurity because no one was able to duplicate the results.

## What is a Hypothesis?

A hypothesis is an

**educated guess**about something in the world around you. It should be testable, either by experiment or observation. For example:

- A new medicine you think might work.
- A way of teaching you think might be better.
- A possible location of new species.
- A fairer way to administer standardized tests.

It can really be *anything at all* as long as you can put it to the test.

## What is a Hypothesis Statement?

If you are going to propose a hypothesis, it’s customary to write a statement. Your statement will look like this:

“If I…(do this to an independent variable)….then (this will happen to the dependent variable).”

For example:

- If I (decrease the amount of water given to herbs) then (the herbs will increase in size).
- If I (give patients counseling in addition to medication) then (their overall depression scale will decrease).
- If I (give exams at noon instead of 7) then (student test scores will improve).
- If I (look in this certain location) then (I am more likely to find new species).

A good hypothesis statement should:

- Include an “if” and “then” statement (according to the University of California).
- Include both the independent and dependent variables.
- Be testable by experiment, survey or other scientifically sound technique.
- Be based on information in prior research (either yours or someone else’s).
- Have design criteria (for engineering or programming projects).

## What is Hypothesis Testing?

Hypothesis testing in statistics is a way for you to test the results of a survey or experiment to see if you have meaningful results. You’re basically testing whether your results are valid by figuring out the odds that your results have happened by chance. If your results may have happened by chance, the experiment won’t be repeatable and so has little use.

Hypothesis testing can be one of the most confusing aspects for students, mostly because before you can even perform a test, you have to know what your **null hypothesis** is. Often, those tricky word problems that you are faced with can be difficult to decipher. But it’s easier than you think; all you need to do is:

- Figure out your null hypothesis,
- State your null hypothesis,
- Choose what kind of test you need to perform,
- Either accept or reject the null hypothesis.

### What is the Null Hypothesis?

If you trace back the history of science, the null hypothesis is always the accepted fact. Simple examples of null hypotheses that are generally accepted as being true are:

- DNA is shaped like a double helix.
- There are 8 planets in the solar system (excluding Pluto).
- Taking Vioxx can increase your risk of heart problems (a drug now taken off the market).

### How do I State the Null Hypothesis?

You won’t be required to actually perform a real experiment or survey in elementary statistics (or even disprove a fact like “Pluto is a planet”!), so you’ll be given word problems from real-life situations. You’ll need to figure out what your hypothesis is from the problem. This can be a little trickier than just figuring out what the accepted fact is. With word problems, you are looking to find a fact that is nullifiable (i.e. something you can reject).

## Hypothesis Testing Examples #1: Basic Example

A researcher thinks that if knee surgery patients go to physical therapy twice a week (instead of 3 times), their recovery period will be longer. Average recovery times for knee surgery patients is 8.2 weeks.

The hypothesis statement in this question is that the researcher believes the average recovery time is more than 8.2 weeks. It can be written in mathematical terms as:

H_{1}: μ > 8.2

Next, you’ll need to **state the null hypothesis** (See: How to state the null hypothesis). That’s what will happen if the researcher is *wrong*. In the above example, if the researcher is wrong then the recovery time is less than or equal to 8.2 weeks. In math, that’s:

H_{0} μ ≤ 8.2

## Rejecting the null hypothesis

Ten or so years ago, we believed that there were 9 planets in the solar system. Pluto was demoted as a planet in 2006. The null hypothesis of “Pluto is a planet” was replaced by “Pluto is not a planet.” Of course, rejecting the null hypothesis isn’t always that easy — the hard part is usually figuring out what your null hypothesis is in the first place.

## Hypothesis Testing Examples (One Sample Z Test)

The one sample z test isn’t used very often (because we rarely know the actual population standard deviation). However, it’s a good idea to understand how it works as it’s one of the simplest tests you can perform in hypothesis testing. In English class you got to learn the basics (like grammar and spelling) before you could write a story; think of one sample z tests as the foundation for understanding more complex hypothesis testing. This page contains two hypothesis testing examples for one sample z-tests.

## One Sample Hypothesis Testing Examples: #2

A principal at a certain school claims that the students in his school are above average intelligence. A random sample of thirty students IQ scores have a mean score of 112. Is there sufficient evidence to support the principal’s claim? The mean population IQ is 100 with a standard deviation of 15.

Step 1: State the Null hypothesis. The accepted fact is that the population mean is 100, so: H_{0}: μ=100.

Step 2: State the Alternate Hypothesis. The claim is that the students have above average IQ scores, so:

H_{1}: μ > 100.

The fact that we are looking for scores “greater than” a certain point means that this is a one-tailed test.

Step 3: Draw a picture to help you visualize the problem.

Step 4: State the alpha level. If you aren’t given an alpha level, use 5% (0.05).

Step 5: Find the rejection region area (given by your alpha level above) from the z-table. An area of .05 is equal to a z-score of 1.645.

Step 6: Find the test statistic using this formula:

For this set of data: z= (112.5-100) / (15/√30)=4.56.

Step 6: If Step 6 is greater than Step 5, reject the null hypothesis. If it’s less than Step 5, you cannot reject the null hypothesis. In this case, it is greater (4.56 > 1.645), so you can reject the null.

## One Sample Hypothesis Testing Examples: #3

Blood glucose levels for obese patients have a mean of 100 with a standard deviation of 15. A researcher thinks that a diet high in raw cornstarch will have a positive or negative effect on blood glucose levels. A sample of 30 patients who have tried the raw cornstarch diet have a mean glucose level of 140. Test the hypothesis that the raw cornstarch had an effect.

Step 1: State the null hypothesis: H_{0}:μ=100

Step 2: State the alternate hypothesis: H_{1}:≠100

Step 3: State your alpha level. We’ll use 0.05 for this example. As this is a two-tailed test, split the alpha into two.

0.05/2=0.025

Step 4: Find the z-score associated with your alpha level. You’re looking for the area in *one tail only*. A z-score for 0.75(1-0.025=0.975) is 1.96. As this is a two-tailed test, you would also be considering the left tail (z=1.96)

Step 5: Find the test statistic using this formula:

z=(140-100)/(15/√30)=14.60.

Step 6: If Step 5 is less than -1.96 or greater than 1.96 (Step 3), reject the null hypothesis. In this case, it is greater, so you *can* reject the null.

*This process is made much easier if you use a TI-83 or Excel to calculate the z-score (the “critical value”).

See:

## Hypothesis Testing Examples: Mean (Using TI 83)

You can use the **TI 83** calculator for hypothesis testing, but the calculator won’t figure out the null and alternate hypotheses; that’s up to you to read the question and input it into the calculator.

**Sample problem**: A sample of 200 people has a mean age of 21 with a population standard deviation (σ) of 5. Test the hypothesis that the population mean is 18.9 at α = 0.05.

**Step 1:** State the null hypothesis. In this case, the null hypothesis is that the population mean is 18.9, so we write:

**H _{0}: μ = 18.9**

**Step 2:** State the alternative hypothesis. We want to know if our sample, which has a mean of 21 instead of 18.9, really is different from the population, therefore our alternate hypothesis:

**H _{1}: μ ≠ 18.9**

**Step 3:** Press Stat then press the **right arrow** twice to select TESTS.

**Step 4:** Press 1 to select **1:Z-Test…**. Press ENTER.

**Step 5:** Use the **right arrow** to select **Stats**.

**Step 6:** Enter the data from the problem:

μ_{0}: 18.9

σ: 5

: 21

n: 200

μ: ≠μ_{0}

**Step 7:** Arrow down to **Calculate** and press ENTER. The calculator shows the p-value:

p = 2.87 × 10^{-9}

This is smaller than our alpha value of .05. That means we should **reject the null hypothesis**.

## Bayesian Hypothesis Testing: What is it?

Bayesian hypothesis testing helps to answer the question:

*Can the results from a test or survey be repeated?*

Why do we care if a test can be repeated? Let’s say twenty people in the same village came down with leukemia. A group of researchers find that cell-phone towers are to blame. However, a second study found that cell-phone towers had nothing to do with the cancer cluster in the village. In fact, they found that the cancers were completely random. If that sounds impossible, it actually can happen! Clusters of cancer can happen simply by chance. There could be many reasons why the first study was faulty. One of the main reasons could be that they just didn’t take into account that sometimes things happen randomly and we just don’t know why.

## P Values.

It’s good science to let people know if your study results are solid, or if they could have happened by chance. The usual way of doing this is to test your results with a p-value. A p value is a number that you get by running a hypothesis test on your data. A P value of 0.05 (5%) or less is usually enough to claim that your results are repeatable. However, there’s another way to test the validity of your results: Bayesian Hypothesis testing. This type of testing gives you another way to test the strength of your results.

## Bayesian Hypothesis Testing.

Traditional testing (the type you probably came across in elementary stats or AP stats) is called Non-Bayesian. It is how often an outcome happens over repeated runs of the experiment. It’s an **objective** view of whether an experiment is repeatable.

Bayesian hypothesis testing is a **subjective **view of the same thing. It takes into account how much faith you have in your results. In other words, would you wager money on the outcome of your experiment?

## Differences Between Traditional and Bayesian Hypothesis Testing.

Traditional testing (Non Bayesian) requires you to repeat sampling over and over, while Bayesian testing does not. The main different between the two is in the first step of testing: stating a probability model. In Bayesian testing you add prior knowledge to this step. It also requires use of a posterior probability, which is the conditional probability given to a random event after all the evidence is considered.

## Arguments for Bayesian Testing.

Many researchers think that it is a better alternative to traditional testing, because it:

- Includes prior knowledge about the data.
- Takes into account personal beliefs about the results.

## Arguments against.

- Including prior data or knowledge isn’t justifiable.
- It is difficult to calculate compared to non-Bayesian testing.

## Hypothesis Testing Articles

- What is a Rejection Region?
- What is a Two Tailed Test?
- How to Decide if a Hypothesis Test is a One Tailed Test or a Two Tailed Test.
- How to Decide if a Hypothesis is a Left Tailed Test or a Right-Tailed Test.
- How to State the Null Hypothesis in Statistics.
- How to Find a Critical Value.
- How to Support or Reject a Null Hypothesis.

**Specific Tests:
**

- ANOVA.
- Chi Square Test for Normality
- F Value in ANOVA: When to reject the null.
- F Test: What is it?
- The two tailed F Test.
- F Test to Compare Two Variances.
- Granger Causality Test.
- KPSS Test.
- What is a Likelihood-Ratio Test?
- MANCOVA
- Sequential Probability Ratio Test
- How to Run a Sign Test.
- T Test: one sample.
- T-Test: Two sample.
- Welch’s ANOVA.
- Welch’s Test for Unequal Variances.
- Z-Test: one sample.
- Z Test: Two Proportion
- Wald Test.

**Related Articles:
**

- How to calculate the Least Significant Difference.
- What is a Standardized Test Statistic?
- Standardized values: Example.
- Degrees of Freedom.
- How to Find Standard Error
- How to Calculate Chebyshev’s Theorem.
- Mean Difference (Difference in Means)
- How to Find a Sample Size (General Instructions).
- Levels in Statistics.
- How to Calculate Margin of Error.
- How to Calculate a Z-Score.
- How to Calculate a T-Score.
- What is the Neyman-Pearson Lemma?
- Testing a Single Mean.
- Unequal Sample Sizes.
- The Multiple Testing Problem.
- REGWF
- Sig 2(Tailed) meaning in results
- T-Score Vs. a Z.Score.
- Uniformly Most Powerful Tests.

If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you’re are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.

Is a z-score the same as a z-test?

No, they are different. A z-score is something you find in a table. A z-test uses a z-score and is part of a hypothesis test. See

Please help me to understand the z scores

Hi, Erica…our Youtube channel will help!

I cant figure out what test to do for my dissertation.

I have tested and counted 4 areas;

1. I counted the number of ewes who went into parturition per hour between 1900 – 0700 during the night for 30 days. This is the most important for me as I’m trying to see if ewes enter parturition at a set point in the night or not.

2. During the 12 hours I also tested light levels per hour for 30 days and I don’t know what test to do to find or not find a relation between light levels and ewes entering parturition. I want to prove or disprove cause and effect.

3. I also have done this for temperature and humidity (both individually) to see if they effect ewes entering parturition.

No-one I know can figure out which statistical test(s) I can do with the results, basically I have 4 tables of data that I tested for 12 hours (Once an hour eg 1900 – 1959, 2000 – 2059 etc…) for 30 days.

The light levels, humidity levels and temperature I need to compare with the ewes entering parturition data, I’ve calculated the means and standard deviation but, I get mixed results when I then run an ANVOVA test, t test two sample assuming equal variances and an f test two sampled for variances

Any help or hints would be a massive help!

Watched the youtube videos too but I think this might be more complicated than the basics!

Many thanks!

Hello, Jason,

Could you please post on our help forum?

One of our mods will be happy to help :)

could you guys explain the P-value?

Check out this article: What is a p-value?

Its oh my goshhh::::::::::::::!!!!!!!!!!!!!!!!!!!!!!!!

Hello, my significant level is 10% (0.10) and my p value for 2 independent variable (after running a wald test) is 0.0000 so how can I interpret this?

You have a tiny p-value (it’s probably 0.000021 or some other small number). You can reject the null.

Im having a hard time answer a problem. The genetics and IV I situate conduct a clinical trial of the YOSORT method designed to increase the probability of a boy and 239 of them were Boyd’s. Use a 0.01 significance level to test the claim that the YOSORT method is effective in increasing the like hood that a baby will be a boy . I have to identify the null hypothesis, alternative hypothesis, test status is, p-value or critical value .

I can remember how to figure the critical value I’m suing the formula P hat -p/pqn

Can you please help me

Krista,

I’m not sure what your question is. You list quite a few (identify null, alternate, test status, p-value or critical). Are you having trouble identifying the null and alternate hypotheses? Or is it that you don’t know what test to run?

BTW: both the critical value and p-value will give you the same results. I’d just choose one and go from there.

Stephanie

I have a question about critical value and t-value. If your critical value is 2.412 and your t-value is -3.68 (p<0.01), isn't this not considered significant because in a one-tailed test it is in the wrong tail, and it can't be a two-tailed test because it only lists the critical value as a positive number? I am trying to complete a problem but am stuck on this point. Should I just consider the absolute value of the critical value and t-value?

Thanks!

Your critical value is 2.412, which cuts off the right tail. Any t-value greater than 2.412 is going to be significant. As your t-value is -3.68, that’s not significant. You can’t use the absolute value, as this is not a two-tailed test. I would double check your data though! Also, you say that ” it can’t be a two-tailed test because it only lists the critical value as a positive number?”. The critical value doesn’t determine what tailed test it is: your hypothesis does that (i.e. “Is such and such equal to or greater than or less than”).

Thank you for your response. The problem I was completing gave us the data (critical value 2.412, t- value -3.68, p-value <0.01) wanted us to create the null and alternative hypothesis and analyze the data for significance. I was confused on how to write the hypotheses because the critical value was positive and the t-value was negative.

The null for a test might be “the mean is equal to 0” and the alternate might be “the mean is not equal to zero”. I can’t see how you would be able to formulate a null/alternate from the test values. Were you given any other information in the question?

How does a negative z-score effect the critical region of the test?

A negative z-score would result in a left-tail.

Thank you very much this site helps me a lot……

A physician claims atleast 20% of drivers in a town have TB.To justify his claim 300 drivers were randomly selected and 80 were found to have TB.Test the significance of physician’s claim.

Need solution of the above problem.

/What have you tried so far? Have you tried hypothesis test for a proportion?

Can someone help me on this question A commuter taxi is believed to take 30 minutes or more. To test this claim you observe 86 random taxis is 27,9 minutes with a standard deviation of 10,5 minutes. Assume that the journey time is normally distributed.

1. Formulate Ho and H1

Hi!

Thanks so much for sharing this useful lecture ;)

I may be wrong, but I’d say in the first example, when you say:

If Step 6 is greater than “Step 4” –> it should say “Step 5”

Thanks!

Thank you for that correction, Andres. I have updated the article.