Hypothesis Testing is about testing a claim about a population parameter using sample data. The claim is called the null hypothesis, denoted by . The alternative hypothesis is denoted by .

Confidence Intervals and hypothesis tests will yield the same analysis by tying to the -level significance.


Hypothesis Testing takes a sample statistic and uses it to make a decision about a population parameter. The test is based on a probability.

Definitions

  • : Null Hypothesis
  • : Alternative Hypothesis
  • : Sample Statistic
  • : Population Parameter
  • , : Null Hypothesis value
    • Also known as p-naught

We see if the sample statistic is different from the given value or not.

How different are they?

Answer

Not a very big difference good kind of variability, natural sampling variability “could happen by chance alone”

Answer

A very big difference the sample statistic is NOT behaving consistently with the null hypothesis and hypthesized mean.

Let’s create a normal distruibtution graph to describe this.

MatPlotLib Graph

Python
Output

Use Standard Deviation to measure distance on a population model.


Example Problems

First Problem

Example

Civil engineers collected data from one area of Wisconsin on the amount of salt(tons) used to keep highways drivable during a snowstorm. Historic use of salt in that area was 2000 tons per storm. The amount of salt for storms has tons and tons. Test the claim that the mean salt use per storm has decreased.

How Do We Test This Claim?

Lets start with labeling what we know.

Means.

Notation

200451753.9819.35

Unit Hypotheses

Null Hypothesis:

The null hypothesis is that the mean salt use per storm has not decreased.

Alternative Hypothesis:

The alternative hypothesis is that the mean salt use per storm has decreased.

Model

The model is a normal distribution. Like the one we plotted above, we will use python to plot this.

We have and .

We will label the area between and as .

Python
Output

Calculations:

Conclusions:

assumes the mean salt use per storm has not decreased.

assumes the mean salt use per storm has decreased.

Understanding the Distrubtion

As the distribution gets further away from the null hypothesis, the probability of the null hypothesis being true decreases, as the amount of evidence increases.

Let’s label another graph

Python
Output

More Definitions

  • : The test statistic
  • : The probability of observing a test statistic as extreme as the one computed, given that the null hypothesis is true.
  • : Rejecting the null hypothesis when it is true.
  • : Failing to reject the null hypothesis when it is false.

Finding Values on a TI-84 Plus CE


Hypothesis Test Decision-making

Hypothesis Testing decisions need to be contextual

Example

David - Environmental Lobbyist

  • “any victory, no matter how small, is a victory for the environment” David works for the nonprofit organization, “Save the Earth”.

Alex - Fiscally Minded, DPW Budget Analyst

  • “We can’t afford to waste money on unnecessary environmental programs” Alex works for the Department of Public Works on the budgeting team.

We have a moderate amount of evidence to support that the mean salt use per storm has decreased.

Let’s talk about the STATISTICAL SIGNIFICANCE of the test.

Using a -level of significance of 0.05, we can say that the p-value is less than .

People will make decisions based on the context of the situation, and since the evidence is only moderate, the decision will be based on the context of the situation.

David might say that the evidence is enough to support the claim that the mean salt use per storm has decreased.

Alex might say that the evidence is not enough to support the claim that the mean salt use per storm has decreased.

Using the P-Value

We generally say that if:


Conclusion

Hypothesis testing provides a systematic method to evaluate claims about a population parameter using sample data. The process involves:

  1. Formulating null and alternative hypotheses.
  2. Calculating a test statistic based on the sample.
  3. Comparing the p-value to a significance level to make a decision.