Statistics Notes Introduction to Hypothesis Testing

Page 1

Statistics Introduction to Hypothesis Testing


An important technique in inferential statistics is hypothesis testing. A statistical hypothesis test is a method of making statistical decisions using experimental data. It is a process that uses sample statistics to test a claim about the value of a population parameter.

A statistical hypothesis is an assumption about a population parameter. This assumption may or may not be true.


As in all statistics, the best way to determine whether a statistical hypothesis is true would be to examine the entire population. Since that is often impractical, researchers typically examine a random sample from the population. If the sample data is consistent with the statistical hypothesis, the hypothesis is accepted; if not, it is rejected. To test a statistical hypothesis, we will state a pair of hypothesis – one that represents the claim and one that is its complement.


1) Null hypothesis. The null hypothesis, denoted by H0, is usually the hypothesis that sample observations result purely from chance. It is a statistical hypothesis that contains a statement of equality, such as ≤, =, or ≼. 2) Alternative hypothesis. The alternative hypothesis, denoted by Ha, is the hypothesis that sample observations are influenced by some non-random cause. It is the complement of the null hypothesis. It is a statement that must be true if H0 is false and it contains a statement of inequality, such as >, ≠, or <.


Example. A university claims that the proportion of its students who graduate in four years is 82%. H0: p = 0.82 (claim) Ha: p ≠ 0.82 Example. A water faucet manufacturer claims that the mean flow rate of a certain type of faucet is less than 2.5 gallons per minute. H0: μ ≥ 2.5 Ha: μ < 2.5 (claim) Example. A cereal company claims that the mean weight of the contents of its 20-ounce size cereal boxes is more than 20 ounces. H0: μ ≤ 20 Ha: μ > 20 (claim)


Example. An automobile battery manufacturer claims that the mean life of a certain type of battery is 74 months. H0: μ = 74 (claim) Ha: μ ≠ 74 Example. A television manufacturer claims that the variance of the life of a certain type of television is less than or equal to 3.5. H0: σ2 ≤ 3.5 (claim) Ha: σ2 > 3.5 Example. A radio station claims that its proportion of the local listening audience is greater than 39%. Ha: p > 0.39 (claim) H0: p ≤ 0.39


No matter which hypothesis represents the claim, we will always begin a hypothesis test by assuming that the equality condition in the null hypothesis is true. When we perform a hypothesis test, we will make one of two decisions: 1) we will reject the null hypothesis or 2) we will fail to reject the null hypothesis Because our decision making is based on sampling – incomplete information – these is always the possibility we will make the wrong decision.


Type I error Type I error, also known as an "error of the first kind," an ι error, or a "false positive" is the error of rejecting a null hypothesis when it is actually true. It occurs when we are observing a difference when in truth there is none. Type II error Type II error, also known as an "error of the second kind," a β error, or a "false negative" is the error of failing to reject a null hypothesis when it is actually false. This is the error of failing to observe a difference when in truth there is one.


Example. The USDA limit for salmonella contamination for chicken is 20%. A meat packing company claims that its chicken falls within the limit. You perform a hypothesis test to determine whether the company’s claim is true. p ≤ .20 → H0 (claim) p > . 20 → Ha When will a type I or type II error occur? Which is more serious?


Type I error occurs when we sample from the population and for some reason we reject the null. In this case, we think the null is incorrect, we think that more than 20% of the chicken is infected, and we reject the null. We reject something that we in error think is incorrect. We just threw away a lot of good chicken. Type II error occurs when we sample from the population and knowing that null is incorrect, we fail to reject it. In this case, we know that more than 20% of the chicken is infected, but we fail to reject the population. We didn’t reject something that we know is incorrect. We just put chicken in the market place that we know is more infected than USDA limits.


The type II error is more serious. It is bad to throw away good chicken (type I error) but it is worse to sell known infected chicken(type II error).

Example. A company specializing in parachute assembly claims that its main parachute failure rate is not more than 1%. You perform a hypothesis test to determine whether the company’s claim is true. Write out the null and alternative hypothesis. When will a type I or type II error occur? Which is more serious?



When an independent variable appears to have an effect, it is very important to be able to state with confidence that the effect was really due to the variable and not just due to chance. Because there is variation from sample to sample, there is always a possibility that we will reject a null hypothesis when it is actually true. We can decrease the probability of doing so by lowering the level of significance. In statistics “significant” means probably true (not due to chance). “Highly significant” means something is very probably true.


The most common level, used to determine that a claim is good enough to be believed, is .95. This means that the finding has a 95% chance of being true. But how we will test is by showing that the findings have a 5% (.05) chance of not being true, which is the opposite of a 95% chance of being true. The significance level of a test is defined as the probability of making a decision to reject the null hypothesis when the null hypothesis is actually true (a Type I error).


The decision is often made using a P-value: if the Pvalue is less than the significance level, then the null hypothesis is rejected. The smaller the P-value, the more significant the result is said to be. The nature of a hypothesis test depends on whether the hypothesis test is a left-, right-, or two-tailed test. The type of test depends on the region of the sampling distribution that favors a rejection of H0. This region is indicated by the alternative hypothesis.




The smaller the P-value of the test, the more evidence there is to reject the null hypothesis. However, this rejection does not constitute proof that the null hypothesis is false – we could be working with a bad sample. To conclude a hypothesis test, we make a decision and interpret that decision. There are two possible outcomes – 1) reject the null hypothesis, and 2) fail to reject the null hypothesis. To use a P-value to make a conclusion in a hypothesis test, compare the P-value to α. 1. If P ≤ α, then reject H0. 2. If P > α, then fail to reject H0.


Example: In an advertisement, a pizza shop claims that its mean delivery time is less than 30 minutes. A random selection of 36 delivery times has a sample mean of 28.5 minutes and a standard deviation of 3.5 minutes. Is there enough evidence to support the claim at α = 0.01? Use a P-value. n = 36 x = 28.5 μ = 30 σ = 3.5 α = 0.01 μ < 30 → Ha (claim)(left tail test) μ ≥ 30 → H0


Find z score. x   28.5  30 z    / n 3.5 / 36 z = -2.571428571 Find P-value.

From earlier… To use a P-value to make a conclusion in a hypothesis test, compare the P-value to α. 1. If P ≤ α, then reject H0. 2. If P > α, then fail to reject H0.


P = 0.0050644417 α = 0.01 If P ≤ α, then reject H0. Since P is less than α, we will reject the null hypothesis and accept the alternative hypothesis. This is good for the pizza place, because the alternative hypothesis was their claim. Good job pizza place.



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.