Business Analytics

Topic 10

Hypothesis testing:

Describing a single population

Part 1

Learning objectives

LO1 Understand the fundamental concepts of hypothesis testing

LO2 Set up the null and alternative hypotheses, and be familiar with the steps involved in hypothesis testing

LO3 Test hypotheses regarding the population mean when the population variance is known

LO4 Test hypotheses regarding the population mean when the population variance is unknown

LO5 Understand the p-value approach to testing hypotheses and calculate the p-value of a test

Learning objectives…

LO6 Interpret the results of a test of hypothesis

LO7 Calculate the probability of a Type II error and interpret the results

L08 Test hypothesis regarding the population proportion

LO9 Understand the consequences of the violation of the required conditions of each test.

Introduction

The purpose of hypothesis testing is to determine whether there is enough statistical evidence in favour of a certain belief about a population parameter.

Introduction…

Examples

In a criminal trial, a jury must decide whether the defendant is innocent or guilty based on the evidence presented at the court.

Is there statistical evidence in a random sample of potential customers, that supports the hypothesis that more than 20% of potential customers will purchase a new product?

Is a new drug effective in curing a certain disease? A sample of patients is randomly selected. Half of them are given the drug, and the other half a placebo. The improvement in the patients’ conditions is then measured and compared.

13.1 Concepts of hypothesis testing

Five components of a hypothesis test

1. Null hypothesis (H0)

2.Alternative hypothesis (HA)

3.Test statistic

4.Rejection region

5.Decision rule

In a criminal trialA criminal trial is an example of hypothesis testing without the statistics.

In a criminal trial, a jury must decide whether the defendant is innocent or guilty based on the evidence presented at the court.

In a trial a jury must decide between two hypotheses, the null hypothesis H0 is

H0: The defendant is innocent.

The alternative hypothesis HA is

HA: The defendant is guilty.

The jury does not know which hypothesis is true. They must make a decision on the basis of evidence presented.

In the language of statistics convicting the defendant is called

rejecting the null hypothesis (the defendant is innocent) in favor of the alternative hypothesis (the defendant is guilty).

That is, the jury is saying that there is enough evidence to conclude that the defendant is guilty (i.e., there is enough evidence to support the alternative hypothesis).

If the jury acquits it is stating that

there is not enough evidence to support the alternative hypothesis.

Notice that the jury is not saying that the defendant is innocent, only that there is not enough evidence to support the alternative hypothesis. That is why we never say that ‘we accept the null hypothesis’ (that the defendant is innocent).

Two possible errors can be made in any test.

A Type I error occurs when we reject a true null hypothesis (i.e. reject H0 when H0 is true). In the criminal trial, a Type I error occurs when the jury convicts an innocent person.

A Type II error occurs when we don’t reject a false null hypothesis (i.e. do not reject H0 when H0 is false). In a criminal trial, a Type II error occurs when a guilty defendant is acquitted.

The probability of a Type I error is denoted as a (Greek letter alpha). The probability of a Type II error is b (Greek letter beta).

P (making Type I error) = a

P (making Type II error) = b

a is called the level of significance.

The two probabilities are inversely related. Decreasing one increases the other.

In our judicial system, Type I errors are regarded as more serious. We try to avoid convicting innocent people (think about capital punishment!). Therefore, we are more willing to acquit a guilty person.

We arrange to make a small by requiring the prosecution to prove its case and instructing the jury to find the defendant guilty only if there is ‘evidence beyond a reasonable doubt’.

Concepts of hypothesis testing…

Null and alternative hypotheses

There are two hypotheses. One is called the null hypothesis and the other the alternative hypothesis. The usual notation is:

H0: — the ‘null’ hypothesis

HA: — the ‘alternative’ hypothesis

The null hypothesis (H0) will always state that the parameter

Concepts of hypothesis testing…

Null and alternative hypotheses

Test on population means:

H0: μ = μ0 (μ0 is a given value for μ)

HA: μ ≠ μ0 or HA: μ < μ0 or HA: μ > μ0

Test on population proportions:

H0: p = p0 (p0 is a given value for p)

HA: p ≠ p0 or HA: p < p0 or HA: p > p0

Concepts of hypothesis testing…

Concepts of hypothesis testing…

A rejection region of a test consists of all values of the test statistic for which H0 is rejected.

An acceptance region of a test consists of all values of the test statistic for which H0 is not rejected.

The critical value is the value that separates the acceptance and rejection region.

The decision rule defines the range of values of the test statistic for which H0 is rejected in favour of HA.

1. There are two hypotheses, the null and the alternative hypotheses.

2. The procedure begins with the assumption that the null hypothesis is true.

3. The goal is to determine whether there is enough evidence to infer that the alternative hypothesis is true.

Concepts of hypothesis testing…

4. There are two possible decisions:

•Conclude that there is enough evidence to support the alternative hypothesis.

•Conclude that there is not enough evidence to support the alternative hypothesis.

5. Two possible errors can be made.
•Type I error: Reject a true null hypothesis.

•Type II error: Do not reject a false null hypothesis.

P(making a Type I error) = a = level of significanceP(making a Type II error) = b

Concepts of hypothesis testing…

Consider an example where we want to know whether the population mean is different from 130 units. We can rephrase this request into a test of the hypothesis:

H0: µ = 130

Thus, our alternative hypothesis becomes:

HA: µ ≠ 130

The testing procedure begins with the assumption that the null hypothesis is true.

Thus, until we have further statistical evidence, we will

H0: m = 130 (assumed to be TRUE)

The

That is, is there sufficient statistical information to determine if this statement is true?

HA: µ ≠ 130

There are two possible decisions that can be made:

Conclude that there is enough evidence to support the alternative hypothesis (also stated as: rejecting the null hypothesis in favour of the alternative).

Conclude that there is not enough evidence to support the alternative hypothesis (also stated as: not rejecting the null hypothesis in favour of the alternative).

NOTE: we do not say that we accept the null hypothesis…

Once the null and alternative hypotheses are stated, the next step is to select a random sample from the population and calculate a test statistic (in this example, the sample mean).

If the test statistic’s value is inconsistent with the null hypothesis we reject the null hypothesis and infer that the alternative hypothesis is true.

Right-tail test

Left-tail test

Two-tail test

One- and two-tail tests: A summary

Six-step process for testing hypothesis

Step 1: Set up the null and alternative hypotheses.

Note: Since the alternative hypothesis answers the question, set this one up first. The null hypothesis will automatically follow.

Step 2: Determine the test statistic and its sampling distribution.

Step 3: Specify the significance level.

Note: We usually set α = 0.01, 0.05 or 0.10, but other values are possible.

Six-step process for testing hypothesis…

Step 4: Define the decision rule.

Note: This involves using the appropriate statistical table from Appendix B to determine the critical value(s) and the rejection region.

Step 5: Calculate the value of the test statistic.

Note: Non-mathematicians need not fear. Only simple arithmetic is needed.

Step 6: Make a decision and answer the question.

Note: Remember to answer the original question. Making a decision about the null hypothesis is not enough.

Six-step process for testing hypothesis…

Factors that identify…

Example 1 – Time required to complete an assembly line

The mean of the amount of time required to complete a critical part of a production process on an assembly line is believed to be 130 seconds. To test if this belief is correct, a sample of 100 randomly selected assemblies is drawn and the processing time recorded. The sample mean is 126.8 seconds. If the process time is normally distributed with a standard deviation of 15 seconds, can we conclude that the belief regarding the mean is incorrect?

Example 1 – Solution

Example 1 – Solution…

4. Decision rule

The rejection region is set up so we can reject the null hypothesis when the test statistic is large or when it is small.

That is, we set up a two-tail rejection region. The total area in the rejection region must sum to a, so we divide this probability by 2.

Example 1 – Solution…

As a = 0.05, we have a/2 = 0.025 and z0.025 = 1.96 and our rejection region is z < –1.96 or z > 1.96.

Example 1 – Solution…