Dawn Wright, Ph.D.

Hypothesis Test for Mean Difference using StatCrunch

I see a lot of students struggle with recognizing what a problem statement is asking them to do. Consider this problem:

how to make a hypothesis test in statcrunch

What do you get from that reading? I get:

  • The phrase “Can the engineer support the claim…” tells me this is to be a hypothesis test.
  • The second part of that sentence, “have different mean braking distances” indicates it is a test of the difference in means, µ d = µ 1 – µ 2 .
  • That phrase also tells me the claim is “the means are different” which says the population means are not equal, µ 1 ≠ µ 2 .
  • Since the null hypothesis always is a form of equality, ≤, =, ≥, the null cannot be the claim, which makes the alternative the claim.
  • The alternative hypothesis is the complement of the null, so the two hypotheses are: Ho: µ 1 = µ 2 and Ha: µ 1 ≠ µ 2
  • The math operator in the alternative always indicates the “tail” of the test. Here, it tells me the test is a two-tailed test.
  • The fact that the standard deviations are σ’s, the population standard deviations, and not the sample standard deviations, s, tells me to run a z-test.[Note: some textbook authors say you can run the z-test without the population σ if n is > 30; other authors state you should always run the t-test if you do not have σ. As n increases beyond 30, the difference between the two tests becomes negligible but may be enough to trip you up if you are required to report answers in four decimal places. So, check with your textbook/instructor for the preference on this.]

I like to solve these types of problems using StatCrunch ® .

First, find the critical values of z using the StatCrunch normal calculator: Stat > Calculators > Normal . I prefer to use the “Between” option for two-tailed tests and enter the confidence level, c = 1- alpha, in the probability box. Here, I entered 0.9 and clicked Compute.

how to make a hypothesis test in statcrunch

The resulting graph shows a red area under the curve which represents 0.9, which puts alpha/2 = 0.05 in each tail. The critical values of z are -1.645 and +1.645 and the rejection regions are z < -1.645 and z > +1.645.

Although you could solve for the test statistic manually using

how to make a hypothesis test in statcrunch

and then use tables to find the p-value,

I prefer to use StatCrunch to do the entire test. Use the command sequence Stat > Z Stats > 2 Sample > With Summary .

In the dialog box that opens, enter the data for the two samples. Note: enter the population σ’s for the two samples and do not convert them  to the sample standard error (standard deviation of the sampling distribution). Although you would do this if running the test “manually,” StatCrunch is set up to do this conversion for you.

Click Compute!

how to make a hypothesis test in statcrunch

The test statistic is -0.900, rounding to three decimals, and the p-value is 0.368. The test statistics does not fall in the rejection regions of <-1.645 or >+1.645, therefore the decision is to not reject the null hypothesis. That is the same result the p-value tells us since it is > alpha = 0.1.

Since the alternative is the claim, I would state my conclusion as:

At the 10% significance level, there is not enough evidence to support the claim that the mean braking distance for Type 1 tires is different than Type 2 tires.

Remember, you can quickly get the confidence interval around the mean difference by clicking on the Options button at the top left of the Output window, and click on Edit. Options > Edit. Then change select Confidence Interval for µ 1 – µ 2 and enter the confidence level desired. Then, click Compute!

how to make a hypothesis test in statcrunch

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed .

Have a language expert improve your writing

Run a free plagiarism check in 10 minutes, generate accurate citations for free.

  • Knowledge Base

Hypothesis Testing | A Step-by-Step Guide with Easy Examples

Published on November 8, 2019 by Rebecca Bevans . Revised on June 22, 2023.

Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics . It is most often used by scientists to test specific predictions, called hypotheses, that arise from theories.

There are 5 main steps in hypothesis testing:

  • State your research hypothesis as a null hypothesis and alternate hypothesis (H o ) and (H a  or H 1 ).
  • Collect data in a way designed to test the hypothesis.
  • Perform an appropriate statistical test .
  • Decide whether to reject or fail to reject your null hypothesis.
  • Present the findings in your results and discussion section.

Though the specific details might vary, the procedure you will use when testing a hypothesis will always follow some version of these steps.

Table of contents

Step 1: state your null and alternate hypothesis, step 2: collect data, step 3: perform a statistical test, step 4: decide whether to reject or fail to reject your null hypothesis, step 5: present your findings, other interesting articles, frequently asked questions about hypothesis testing.

After developing your initial research hypothesis (the prediction that you want to investigate), it is important to restate it as a null (H o ) and alternate (H a ) hypothesis so that you can test it mathematically.

The alternate hypothesis is usually your initial hypothesis that predicts a relationship between variables. The null hypothesis is a prediction of no relationship between the variables you are interested in.

  • H 0 : Men are, on average, not taller than women. H a : Men are, on average, taller than women.

Receive feedback on language, structure, and formatting

Professional editors proofread and edit your paper by focusing on:

  • Academic style
  • Vague sentences
  • Style consistency

See an example

how to make a hypothesis test in statcrunch

For a statistical test to be valid , it is important to perform sampling and collect data in a way that is designed to test your hypothesis. If your data are not representative, then you cannot make statistical inferences about the population you are interested in.

There are a variety of statistical tests available, but they are all based on the comparison of within-group variance (how spread out the data is within a category) versus between-group variance (how different the categories are from one another).

If the between-group variance is large enough that there is little or no overlap between groups, then your statistical test will reflect that by showing a low p -value . This means it is unlikely that the differences between these groups came about by chance.

Alternatively, if there is high within-group variance and low between-group variance, then your statistical test will reflect that with a high p -value. This means it is likely that any difference you measure between groups is due to chance.

Your choice of statistical test will be based on the type of variables and the level of measurement of your collected data .

  • an estimate of the difference in average height between the two groups.
  • a p -value showing how likely you are to see this difference if the null hypothesis of no difference is true.

Based on the outcome of your statistical test, you will have to decide whether to reject or fail to reject your null hypothesis.

In most cases you will use the p -value generated by your statistical test to guide your decision. And in most cases, your predetermined level of significance for rejecting the null hypothesis will be 0.05 – that is, when there is a less than 5% chance that you would see these results if the null hypothesis were true.

In some cases, researchers choose a more conservative level of significance, such as 0.01 (1%). This minimizes the risk of incorrectly rejecting the null hypothesis ( Type I error ).

The results of hypothesis testing will be presented in the results and discussion sections of your research paper , dissertation or thesis .

In the results section you should give a brief summary of the data and a summary of the results of your statistical test (for example, the estimated difference between group means and associated p -value). In the discussion , you can discuss whether your initial hypothesis was supported by your results or not.

In the formal language of hypothesis testing, we talk about rejecting or failing to reject the null hypothesis. You will probably be asked to do this in your statistics assignments.

However, when presenting research results in academic papers we rarely talk this way. Instead, we go back to our alternate hypothesis (in this case, the hypothesis that men are on average taller than women) and state whether the result of our test did or did not support the alternate hypothesis.

If your null hypothesis was rejected, this result is interpreted as “supported the alternate hypothesis.”

These are superficial differences; you can see that they mean the same thing.

You might notice that we don’t say that we reject or fail to reject the alternate hypothesis . This is because hypothesis testing is not designed to prove or disprove anything. It is only designed to test whether a pattern we measure could have arisen spuriously, or by chance.

If we reject the null hypothesis based on our research (i.e., we find that it is unlikely that the pattern arose by chance), then we can say our test lends support to our hypothesis . But if the pattern does not pass our decision rule, meaning that it could have arisen by chance, then we say the test is inconsistent with our hypothesis .

If you want to know more about statistics , methodology , or research bias , make sure to check out some of our other articles with explanations and examples.

  • Normal distribution
  • Descriptive statistics
  • Measures of central tendency
  • Correlation coefficient

Methodology

  • Cluster sampling
  • Stratified sampling
  • Types of interviews
  • Cohort study
  • Thematic analysis

Research bias

  • Implicit bias
  • Cognitive bias
  • Survivorship bias
  • Availability heuristic
  • Nonresponse bias
  • Regression to the mean

Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics. It is used by scientists to test specific predictions, called hypotheses , by calculating how likely it is that a pattern or relationship between variables could have arisen by chance.

A hypothesis states your predictions about what your research will find. It is a tentative answer to your research question that has not yet been tested. For some research projects, you might have to write several hypotheses that address different aspects of your research question.

A hypothesis is not just a guess — it should be based on existing theories and knowledge. It also has to be testable, which means you can support or refute it through scientific research methods (such as experiments, observations and statistical analysis of data).

Null and alternative hypotheses are used in statistical hypothesis testing . The null hypothesis of a test always predicts no effect or no relationship between variables, while the alternative hypothesis states your research prediction of an effect or relationship.

Cite this Scribbr article

If you want to cite this source, you can copy and paste the citation or click the “Cite this Scribbr article” button to automatically add the citation to our free Citation Generator.

Bevans, R. (2023, June 22). Hypothesis Testing | A Step-by-Step Guide with Easy Examples. Scribbr. Retrieved August 13, 2024, from https://www.scribbr.com/statistics/hypothesis-testing/

Is this article helpful?

Rebecca Bevans

Rebecca Bevans

Other students also liked, choosing the right statistical test | types & examples, understanding p values | definition and examples, what is your plagiarism score.

IMAGES

  1. StatCrunch: Hypothesis Test with One Sample (Z-test)

    how to make a hypothesis test in statcrunch

  2. StatCrunch: Hypothesis Test with Two Samples (T-test)

    how to make a hypothesis test in statcrunch

  3. StatCrunch: Hypothesis Test with Two Samples (Proportions)

    how to make a hypothesis test in statcrunch

  4. Critical Value using StatCrunch for a Right Tailed Hypothesis Z-Test

    how to make a hypothesis test in statcrunch

  5. StatCrunch: Critical Values for One and Two Sample Hypothesis Tests (Z)

    how to make a hypothesis test in statcrunch

  6. Single-sample Hypothesis Test for a Mean using StatCrunch

    how to make a hypothesis test in statcrunch

COMMENTS

  1. Hypothesis tests and confidence intervals for a mean with ...

    In addition to a hypothesis test, StatCrunch can also create a confidence interval for the population mean. For this example, in the window containing the hypothesis test results above, choose Options > Edit to reopen the dialog window.

  2. Hypothesis tests and confidence intervals for a proportion ...

    Calculating a confidence interval for the proportion In addition to a hypothesis test, StatCrunch can also create a confidence interval for the proportion of interest. For this example, in the window containing the hypothesis test results above, choose Options > Edit to reopen the dialog window. Under Perform, choose Confidence interval for p.

  3. Conducting hypothesis tests for the difference between two ...

    In addition to a hypothesis test, StatCrunch can also create a confidence interval for the difference between the two proportions. For this example, in the window containing the hypothesis test results above, choose Options > Edit to reopen the dialog window.

  4. StatCrunch: Hypothesis Tests and Confidence Intervals for a ...

    In this video you will learn to compute hypothesis tests and confidence intervals for a proportion with summary data using StatCrunch.

  5. StatCrunch: Hypothesis Tests and Confidence Intervals for Two Means

    In this video you will learn how to compute hypothesis tests and confidence intervals for the difference between two means with summary data using StatCrunch.

  6. Using StatCrunch to perform hypothesis testing on matched pair means

    In this video, Professor Curtis uses StatCrunch to demonstrate how to use StatCrunch to perform hypothesis testing on matched pair means (MyStatLab ID# 9.3.2...

  7. PDF K:\stat552\docs\statcrunch_hypothesis.wpd

    THERE ARE TWO WAYS TO DO HYPOTHESIS TESTING WITH STATCRUNCH: WITH SUMMARY DATA (AS IN EXAMPLE 7.17, PAGE 236, IN ROSNER); WITH THE ORIGINAL DATA (AS IN EXAMPLE 8.5, PAGE 301 IN ROSNER THAT USES DATA FROM TABLE 8.1 ON PAGE 298).

  8. Hypothesis tests for a mean

    Hypothesis tests for a mean - StatCrunch ... StatCrunch

  9. Conducting hypothesis tests for the difference between two ...

    This can be tested by conducting a hypothesis test for the difference between the mean square footage of four-bedroom homes listed for sale in each location. To compute the appropriate two-sample T hypothesis test results, choose the Stat > T Stats > Two Sample > With Data menu option. Under Sample 1, select the Sqft column for Values in.

  10. PDF Step-by-step StatCrunch Guide

    Step-by-step StatCrunch Guide This also demonstrates using examples how to go through the steps. Some examples include links to data in StatCrunch.

  11. Hypothesis Test for Mean Difference using StatCrunch

    The alternative hypothesis is the complement of the null, so the two hypotheses are: Ho: µ 1 = µ 2 and Ha: µ 1 ≠ µ 2. The math operator in the alternative always indicates the "tail" of the test. Here, it tells me the test is a two-tailed test. The fact that the standard deviations are σ's, the population standard deviations, and ...

  12. StatCrunch: Conducting Hypothesis Tests for a Mean with ...

    In this video you will learn to conduct hypothesis test for a mean with summary data using StatCrunch.

  13. PDF StatCrunch Reference Guide

    StatCrunch Reference Guide. StatCrunch is a web-based statistical software that can be used to perform statistical analysis. This handout includes instructions for performing several different calculations in StatCrunch. For assistance with navigating StatCrunch, click here to watch a video from the Academic Center for Excellence.

  14. Getting Started with StatCrunch

    The Stat menu contains a number of procedures for summary statistics, tabulation, hypothesis testing, confidence intervals, regression and much more. With this data set, consider the task of computing summary statistics such as the mean and median ages of the respondents.

  15. Hypothesis Testing

    Hypothesis testing is a formal procedure for investigating our ideas about the world using statistics. It is most often used by scientists to test specific predictions, called hypotheses, that arise from theories.

  16. Conducting hypothesis tests for the difference between two ...

    This can be tested by conducting a hypothesis test for the difference between the two proportions. To compute the appropriate two-sample proportion hypothesis test, choose the Stat > Proportion Stats > Two Sample > With Data menu option. Select the Response column for Values in under both Sample 1 and Sample 2.

  17. Hypothesis tests for a proportion

    The hypothesis test is based on the Z statistic. The resulting statistic from the test drops into the plot. Red values are tests where the null hypothesis is rejected at the specified level of significance. Change the default significance level (set at 0.05) by adjusting the Level in the applet. 5 tests and 1000 tests add the hypothesis results ...

  18. StatCrunch: Hypothesis Testing

    This video shows you how to run hypothesis tests for two samples in StatCrunch.

  19. Performing hypothesis testing on two proportions in StatCrunch

    Today we're going to learn how to use StatCrunch to perform hypothesis testing on two proportions. Here's our problem statement: A simple random sample of front seat occupants involved in car crashes is obtained.

  20. Using StatCrunch to perform hypothesis testing on means of course

    Today we're going to learn how to use StatCrunch to perform hypothesis testing on means of course evaluation scores. Here's our problem statement: A data set includes data from student evaluations of courses.

  21. Finding The Test Statistic For a Hypothesis Test Using StatCrunch

    Finding The Test Statistic For a Hypothesis Test Using StatCrunch Peter Willett 417 subscribers 160 32K views 3 years ago ...more

  22. Using StatCrunch to perform hypothesis testing on the proportion of

    Today we're going to learn how to use StatCrunch to perform hypothesis testing on the proportion of polygraph results. Here's our problem statement: Trials in an experiment with a polygraph include 98 results that include 23 cases of wrong results and 75 cases of correct results.

  23. Hypothesis Testing with StatCrunch

    Hypothesis Testing with StatCrunch kingbb13 78 subscribers Subscribed 177 103K views 12 years ago Hypothesis Testing ...more