0% found this document useful (0 votes)
19 views

BS IMI U5 Oct23

business statistics ppt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

BS IMI U5 Oct23

business statistics ppt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 165

Business Statistics

PGDM (2023-24)
Term-II (Oct-Jan, 2023-24)

Ruchika Lochab
Assistant Professor, Operations
IMI, Delhi
Introduction to hypothesis testing

Is a new Malaria drug more


effective than an
existing treatment?
Introduction to hypothesis testing

Has the installation


of a new speed camera
led to a reduction in the
traffic speed?
Introduction to hypothesis testing

A candidate in an
election claims 60%
support. Is the candidate
exaggerating their
level of support?
Introduction to hypothesis testing
Hypothesis testing is concerned with trying to answer questions
like these.

Hypothesis tests are crucial in many subject areas including


medicine, psychology, biology and geography.
Hypothesis Testing
What is Hypothesis?
• “A hypothesis is an educated prediction that can be tested” (study.com).

• “A hypothesis is a proposed explanation for a phenomenon” (Wikipedia).

• “A hypothesis is used to define the relationship between two variables” (Oxford


dictionary).

• “A supposition or proposed explanation made on the basis of limited evidence


as a starting point for further investigation” (Walpole).
Could try explaining things in the
context of “The Court Case”?
• Members of a jury have to decide whether a person is guilty or
innocent based on evidence.
Null: The person is innocent
Alternative: The person is not innocent (i.e. guilty)
• The null can only be rejected if there is enough evidence to doubt it.
i.e., the jury can only convict if there is beyond reasonable doubt for the
null of innocence.
• They do not know whether the person is really guilty or innocent so
they may make a mistake.
Two Types of Errors
Table: Four Possible Outcomes for a Court Case
In any hypothesis-testing problem, there are always two competing
hypotheses under consideration:
• The status quo (null) hypothesis
• The research (alternative) hypothesis

For example,
µ = .75 versus µ ≠ .75
p ³ .10 versus p < .10

The objective of hypothesis testing is to decide, based on sample


information, if the alternative hypotheses is actually supported by the
data.
We usually do new research to challenge the existing (accepted) beliefs.
More Examples of Hypothetical Statement

• A new teaching method is developed that is believed to be better than the


current method.

• A new drug is developed with the goal of lowering blood pressure more than
the existing drug and the result is positive.

• The label on a soft drink bottle states that it contains 67.6 fluid ounces.

• A quality control inspector needs to check if the quantities supplied meet the
specification criteria
TESTING OF HYPOTHESES (aka. significance testing)
• Various concepts
• One tailed test and two tailed test
• Type I error and type II error
• Level of significance
• Power of test
• Testing hypotheses concerning population mean

12/13/23 11
A formal introduction to hypothesis tests
In hypothesis testing we are essentially presented with two rival hypotheses.
Examples might include:
“The coin is fair” or “the coin is biased”;
“The proportion of local people in favour of a by-pass
is 80%” or “the proportion is smaller than 80%”;
“The drug has the same effectiveness as an existing
treatment” or “the drug is more effective”.

These rival hypotheses are referred to as the null and the alternative
hypotheses.
Testing of Hypothesis
• In hypothesis testing, we decide whether to accept or reject a
particular value of a set, of particular values of a parameter or those of
several parameters.

• It is seen that, although the exact value of a parameter may be


unknown, there is often same idea about the true value.

• The data collected from samples helps us in rejecting or accepting our


hypothesis. In other words, in dealing with problems of hypothesis
testing, we try to arrive at a right decision about a pre-stated
hypothesis.
Statistical Hypothesis
If the hypothesis is stated in terms of population parameters (such
as mean and variance), the hypothesis is called statistical
hypothesis.

Example:
• To determine whether the wages of men and women are equal.
• A product in the market is of standard quality.
• Whether a particular medicine is effective to cure a disease.
Parametric Hypothesis:

• A statistical hypothesis which refers only the value of


unknown parameters of probability Distribution
whose form is known is called a parametric
hypothesis.

( )
• Example: if X ~ N µ, s 2 then µ = µ1 , µ > µ1 , µ < µ1
is a parametric hypothesis.

12/13/23 15
Null Hypothesis: H0
v The null hypothesis (denoted by H0) is a statement that the value of
a population parameter (such as proportion, mean, or standard
deviation) is equal to some claimed value.
v A null hypothesis is a claim (or statement) about a population
parameter that is assumed to be true until it is declared false.

v We test the null hypothesis directly.

v Either reject H0 or fail to reject H0.


• The assumption we wish to test is called the null hypothesis.

• Notation for hypothesized value of a population mean=𝜇!! .

• Whenever we reject the hypothesis, the conclusion we do


accept is called the “alternative hypothesis.”

• The purpose of hypothesis testing is not to question the


computed value of sample statistic but to make a judgment
about the difference between that sample statistic and a
hypothesized population parameter.
12/13/23 17
Alternative Hypothesis: H1
v The alternative hypothesis (denoted by H1 or Ha or HA) is the
statement that the parameter has a value that somehow
differs from the Null Hypothesis.

v The symbolic form of the alternative hypothesis must use


one of these symbols: ¹, <, >.
Types of Alternative Hypothesis

We have two kinds of alternative hypothesis:-

(a) One sided alternative hypothesis

(b) Two sided alternative hypothesis

The test related to (a) is called as ‘one – tailed’ test and


those related to (b) are called as ‘two tailed’ tests.
Ho : µ = µ 0

Then

H1 : µ < µ0 or H1 : µ > µ0

One sided alternative hypothesis

H1 : µ ≠ µ 0

Two sided alternative hypothesis


Critical Region
The critical region (or rejection region) is the set of
all values of the test statistic that cause us to reject
the null hypothesis. Acceptance region
Accept H0 ,if the sample
mean falls in this region

95 % of area

Acceptance and
0.025 of area 0.025 of area
rejection regions
in case of a two- µH 0

tailed test with 5% Rejection region


significance level. Reject H0 ,if the sample mean falls
in either of these regions
Significance Level

The significance level (denoted by a) is the


probability that the test statistic will fall in the
critical region when the null hypothesis is
actually true. Common choices for a are 0.05,
0.01, and 0.10.
Critical Value

A critical value is any value that separates the critical region (where
we reject the null hypothesis) from the values of the test statistic
that do not lead to rejection of the null hypothesis. The critical
values depend on the nature of the null hypothesis, the sampling
distribution that applies, and the significance level a.
A formal introduction to hypothesis tests
Significance levels that are typically used are 10%, 5%, 1% and 0.1%.
These significance levels correspond to different rigours of test – the
lower the significance level, the stronger the evidence the test will
provide.

Note: It is important to appreciate that it is not possible to prove that


a hypothesis is definitely true in statistics. Hypothesis tests can only
provide different degrees of evidence in support of a hypothesis. A
10% significance level can only provide weak evidence in support of a
hypothesis. A 0.1% test is much more stringent and can provide very
strong evidence.
Two-tailed, Right-tailed,
Left-tailed Tests

The tails in a distribution are the extreme


regions bounded by critical values.
Two-tailed Test

H0 : = a is divided equally between the


two tails of the critical region
H1 : ¹
Means less than or greater than
A Two-Tailed Test
• According to the U.S. Bureau of Labor Statistics, people in the
United States who had a bachelor’s degree and were
employed earned an average of $1038 a week in 2020.
Suppose an economist wants to check whether this mean has
changed since 2020. The key word here is changed.

• The mean weekly earning of employed Americans with a


bachelor’s degree has changed if it is either increased or
decreased since 2020. This is an example of a two tailed test.
A Two-Tailed Test
• Let μ be the mean weekly earning of employed
Americans with a bachelor’s degree. The two possible
decisions are
– H0 : μ = $1038 (The mean weekly earning of employed
Americans with a bachelor’s degree has not changed
since 2020)
– H1 : μ ≠ $1038 (The mean weekly earning of employed
Americans with a bachelor’s degree has changed since
2020)
A Two-Tailed Test
qWhether a test is two–tailed or one–tailed is
determined by the sign in the alternative
hypothesis.

q If the alternative hypothesis has a not equal to (≠)


sign, it is a two–tailed test.
Figure: A two-tailed test.
Right-tailed Test

H0 : =
H1 : >
Points Right
A Right-Tailed Test
According to www.city-data.com, the average price of
homes in West Orange, New Jersey, was $459,204 in
2019. Suppose a real estate researcher wants to
check whether the current mean price of homes in
this town is higher than $459,204.

The key phrase in this case is higher than, which


indicates a right-tailed test.
A Right-Tailed Test
• Let μ be the current mean price of homes in this town.
The two possible decisions are

–H0 : μ = $459,204 (The current mean price of homes


in this town is not higher than $459,204)
–H1 : μ > $459,204 (The current mean price of homes
in this town is higher than $459,204)
A Right-Tailed Test

When the alternative hypothesis has a greater than


(>) sign, the test is always right–tailed.
Figure: A right-tailed test.
Left-tailed Test

H0 : =
H1 : <
Points Left
A Left-Tailed Test
Consider the example of the mean amount of soda in all soft-drink
cans produced by a company. The company claims that these cans,
on average, contain 12 ounces of soda.
However, if these cans contain less than the claimed amount of soda,
then the company can be accused of cheating.
Suppose a consumer agency wants to test whether the mean
amount of soda per can is less than 12 ounces. Note that the key
phrase this time is less than, which indicates a left-tailed test.
A Left-Tailed Test
• Let μ be the mean amount of soda in all cans. The two possible
decisions are

– H0 : μ = 12 ounces (The mean is equal to 12 ounces)


– H1 : μ < 12 ounces (The mean is less than 12 ounces)
A Left-Tailed Test
In this case, we can also write the null hypothesis as
H0 : μ ≥ 12.

This will not affect the result of the test as long as the sign in
H1 is less than (<).

When the alternative hypothesis has a less than (<) sign, the
test is always left–tailed.
Figure: A left-tailed test.
• Accepting 𝐻" (i.e., accepting null hypothesis)
means there is no statistical evidence to
reject it.
• We are not saying that the null hypothesis is
true.

12/13/23 41
P-Value

The P-value is the smallest level of significance that


would lead to rejection of the null hypothesis H0 with
the given data.

P-value is the observed significance level.

42
P-Values
More generally, the smaller the P-value, the more evidence
there is in the sample data against the null hypothesis and for
the alternative hypothesis.

The p-value measures the “extremeness” of the sample.

That is, H0 should be rejected in favor of Ha when the P- value is


sufficiently small (such large sample statistic is unlikely if the null is
true).

So what constitutes “sufficiently small”? What is


“extreme” enough?
Decision rule based on the P-value
Select a significance level a (as before, the desired type I error
probability), then a defines the rejection region.
Then the decision rule is:
reject H0 if P-value £ a
do not reject H0 if P-value > a

Thus if the P-value exceeds the chosen significance level, the null
hypothesis cannot be rejected at that level.
Note, the P-value can be thought of as the smallest significance
level at which H0 can be rejected.
P-Values for z Tests
The calculation of the P-value depends on whether the test
is upper-, lower-, or two-tailed.

Each of these is the probability of getting a value at least


as extreme as what was obtained (assuming H0 true).
P-Values for z Tests
The three cases are illustrated in Figure.
P-Values for z Tests
cont’d
P-Values in Hypothesis Tests
Consider the two-sided hypothesis test
H0:µ = 50 against H1:µ ¹ 50
with n = 16 and s = 2.5. Suppose that the observed sample mean
is x = 51.3 centimeters per second. Figure on the next slide shows
a critical region for this test with critical values at 51.3 and the
symmetric value 48.7.

The P-value of the test is the a associated with the critical region.
Any smaller value for a expands the critical region and the test
fails to reject the null hypothesis when x = 51.3.
The P-value is easy to compute after the test statistic is observed.
48
P-value = 1 - P(48.7 < X < 51.3)
æ 48.7 - 50 51.3 - 50 ö
= 1 - Pçç <Z< ÷÷
è 2.5 / 16 2.5/ 16 ø
= 1 - P(-2.08 < Z < 2.08)
= 1 - 0.962 = 0.038
Figure: P-value is area of shaded
region when x = 51.3.

12/13/23 49
Two Procedures

Two procedures to make tests of hypothesis

1. The p-value approach


2. The critical-value approach
Decision Criterion

P-value method

Reject H0 if the P-value £ a (where a


is the significance level, such as
0.05).

Accept H0 if the P-value > a.


Type I Error
v A Type I error is the mistake of rejecting the null hypothesis when it
is true.

v A Type I error occurs when a true null hypothesis is rejected. The


value of α represents the probability of committing this type of
error; that is,

α = P(H_0 is rejected | H_0 is true)

v The value of α represents the significance level of the test.

v The symbol a (alpha) is used to represent the probability of a type I


error.
Type II Error
v A Type II error is the mistake of failing to reject the null hypothesis when it
is false.

v A Type II error occurs when a false null hypotheses is not rejected. The value of β
represents the probability of committing a Type II error; that is,

β = P (H0 is not rejected | H0 is false)

v The value of 1 – β is called the power of the test. It represents the probability of not making
a Type II error.

v The symbol b (beta) is used to represent the probability of a type II error.


There may be four possible situations that arise
in any test procedure which have been
summaries are given below:

Actual Truth of H0

Decision
H0 is true H0 is false

Accept H0 Correct Decision Type II Error

Reject H0 Type I Error Correct Decision


Controlling Type I &
Type II Errors
v For any fixed a, an increase in the sample size n will
cause a decrease in b.

v For any fixed sample size n, a decrease in a will cause


an increase in b. Conversely, an increase in a will
cause a decrease in b.

v To decrease both a and b, increase the sample size.


Power and Sample Size
Two types of decision errors:
Type I error = erroneous rejection of true H0
Type II error = erroneous retention of false H0
Truth
Decision H0 true H0 false
Retain H0 Correct retention Type II error
Reject H0 Type I error Correct rejection

α ≡ Probability of a Type I error


β ≡ Probability of a Type II error
The power is computed as 1 - β, and power can be interpreted as the
probability of correctly rejecting a false null hypothesis.

For example,
consider the propellant burning rate problem when we are testing
H0 : μ = 50 centimeters per second
against H1 : μ not equal 50 centimeters per second.
Suppose that the true value of the mean is μ = 52.

When n = 10, we found that β = 0.2643, so the power of this test is


1 – β = 1 - 0.2643
= 0.7357

12/13/23 57
Broad Classification of Hypothesis Tests

Hypothesis Tests

Tests of Tests of
Association Differences

Means Proportions Means Proportions


Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α


and hence confidence level of the test

Step 3: Collect evidence or sample data, compute the


sample statistic, and then test statistic like Z (standard
normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on


decision rule
• p-value approach or
• critical value approach
Hypothesis

•A hypothesis is a statement or assertion about the state of nature


(about the true value of an unknown population parameter):
üThe accused is innocent
ü µ = 100

•Every hypothesis implies its contradiction or alternative:


üThe accused is guilty
ü µ ¹100
Develop Hypotheses

These statements of assertion/claim/belief need to be translated into

a. the statement that you want to test/Testing Statement


against
b. an alternative statement or contradiction of the testing
statement
a is called “Null Hypothesis : H0 “ and
b is called “alternative hypothesis: H1”

H0 and H1 are:
ü Mutually exclusive: Only one can be true.
ü Exhaustive: Together they cover all possibilities, so one or the other must be true.
Develop Null and Alternative
Hypotheses
Example:
A new teaching method is developed that is believed to be better than
the current method.

Alternative Hypothesis: H1
The new teaching method is better.

Null Hypothesis: H0
The new method is no better than the old method.

Alternative Hypothesis is framed as a Research Hypothesis


Develop Null and Alternative
Hypotheses
Example:
The label on a soft drink bottle states that it contains on average at least
67.6 fluid ounces.

Null Hypothesis H0:


The label is correct. μ > 67.6 ounces.

Alternative Hypothesis: H1
The label is incorrect. μ < 67.6 ounces.

Here, Null Hypothesis is framed as an assumption to be challenged.


Summary
The equality part of the hypotheses always appears
in the null hypothesis.

In general, a hypothesis test about the value of a population mean μ


must take one of the following three forms (where μ0 is the
hypothesized value of the population mean).

H 0 : µ ³ µ0 H 0 : µ £ µ0 H 0 : µ = µ0
H a : µ < µ0 H a : µ > µ0 H a : µ ¹ µ0

One-tailed One-tailed Two-tailed


(lower-tail) (upper-tail)
Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α


and hence confidence level of the test

Step 3: Collect evidence or sample data, compute the


sample statistic, and then test statistic like Z (standard
normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on


decision rule
• p-value approach or
• critical value approach
Possible Outcomes of Hypothesis
Tests
•A hypothesis is either true or false, and you may fail to
reject it or you may reject it on the basis of information:
üTrial testimony and evidence
üSample data
Limitation of working with sample is that we cannot be 100%
confident about our decisions. But we can be reasonably
confident (90%, 95%, 98%, or 99%) if we can optimally
minimize the chances of error to 10%, 5%, 2% or 1%
respectively.
Possible Outcomes of Hypothesis
Tests
• There are two possible states of nature:
üH0 is true
üH0 is false
• There are two possible decisions:
üFail to reject H0 as it is true
üReject H0 as it is false
Possible Outcomes of Hypothesis
Tests

• A decision may be correct in two ways:


üFail to reject a true H0
üReject a false H0
• A decision may be incorrect in two ways:
üReject a true H0
üFail to reject a false H0
Type I and Type II Errors
Type-I Error: Reject a true H0
• A Type-I error is probability of rejecting H0 when it is true.
• The Probability of a Type I error is denoted by α.
• α is called the level of significance of the test
• (1- α) is the probability of accepting H0 when it is true is
confidence level

Type-II Error: Fail to reject a false H0


• A Type-II error is probability of accepting H0 when it is false.
• The Probability of a Type-II error is denoted by β.
• Statisticians avoid the risk of making a Type II error by using
“do not reject H0” and not “accept H0”. It is difficult to control
• The complement of β, (1 – β) is the probability of rejecting H0
when it is false called the “power of the test”.
Type I and Type II Errors
A contingency table illustrates the possible outcomes of a
statistical hypothesis test
States of Nature/Population Conditions

H0 True H0 False
Conclusion

Accept H0 Correct
Type II Error
Decision

Correct
Reject H0 Type I Error Decision
General Rule to select
Type I error and Type II error
• Cases where Type-I error is more costly, we choose a small
value of α, namely 1%

• Cases where Type-II error is more costly, we keep large


value of α, namely 10%

• Cases where we are not able to determine which type of


error is more costly, or if the costs are roughly equal or if
we do not have much knowledge about the relative costs
of the two types of errors, we will keep α = 5%
Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α


and hence confidence level of the test

Step 3: Collect evidence or sample data, compute the


sample statistic, and then test statistic like Z (standard
normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on


decision rule:
• p-value approach or
• critical value approach
Test Statistic
• The null hypothesis H0 is accepted or rejected on the basis
of a ‘Test Statistic’

• A test statistic is a sample statistic computed from sample


data. The value of the test statistic is used in determining
whether or not we may reject the null hypothesis.

• For Population Mean test, z- test statistic or t-test statistic


is used depending on the knowledge of population
standard deviation
Test Population Mean
Cases in which the test statistic is Z

üs is known and the population is normal.


üs is known and the sample size is at least 30. (The
population need not be normal, will approach to normal by
CLT)
The formula for calculating Z is :
x-µ
z=
æs ö
ç ÷
è nø
Test Population Mean
Cases in which the test statistic is t

üs is unknown but the sample standard deviation s is


known and the population is normal.

The formula for calculating t is :


x-µ
t=
æ s ö
ç ÷
è nø
Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α


and hence confidence level of the test

Step 3: Collect evidence or sample data, compute the


sample statistic, and then test statistic like Z (standard
normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on


decision rule:
• p-value approach or
• critical value approach
Decision based on
p-value Approach
p-value:
The p-value is the probability, computed using the test statistic, that measures
the support based on the sample for the null hypothesis.
So, p-value is a kind of “credibility rating” of H0 in light of the sample evidence.
Suppose for the following hypothesis;

H0: µ < 12
H1: µ > 12

p-values obtained are 12% and 2% based on two different samples when α=0.05.
The credibility of H0 when it is 12% is higher than that of 2%. So, the chance of
rejection is high in the case of 2%.
Decision based on
p-value Approach

• If the p-value is less than or equal to the level of


significance α, the value of the test statistic is in the
rejection region.

• Reject H0 if the p-value < α (for one-tailed test)

• For two tailed test, double the tail area to obtain the
p –value.
Critical Value Approach

• For a given level of significance α, we can obtain zα from


normal probability table.

• zα creates the boundary point of the rejection region.

• Rejection region is also known as ‘Critical Region’.

• Boundary Point is also called ‘Critical Points’


Critical Region for two tailed test
When α = 5%

f(z)
Critical Region Critical Region

Acceptance
0.025% Region 0.025%
Total = 5% Level
95%

-z0.05/2 = -1.96 0 z0.05/2 = 1.96 z

Critical Point Critical Point


Two tailed Tests
Confidence Interval Approach

• Select a simple random sample from the population


and use the value of the sample mean x to develop
the confidence interval for the population mean μ.

• If the confidence interval contains the hypothesized


value μ0, do not reject H0. Otherwise, reject H0.
HYPOTHESIS TESTS ABOUT μ: σ KNOWN

Assuming that the null hypothesis is true, the p-value can be


defined as the probability that a sample statistic (such as the
sample mean) is at least as far away from the hypothesized value in
the direction of the alternative hypothesis as the one obtained
from the sample data under consideration.

Note that the p–value is the smallest significance level at which the
null hypothesis is rejected.
Figure: The p–value for a right-tailed test.
Figure: The p–value for a two-tailed test.
Calculating the z Value for x
When using the normal distribution, the value of z for x for a test
of hypothesis about μ is computed as follows:

x -µ s
z= where s x =
sx n
The value of z calculated for x using this formula is also called the
observed value of z.
Steps to Perform a Test of Hypothesis Using the
p–Value Approach
1. State the null and alternative hypothesis.
2. Select the distribution to use.
3. Calculate the p–value.
4. Make a decision.
Example
The management of Priority Health Club claims that its
members lose an average of 10 pounds or more within
the first month after joining the club.
A consumer agency that wanted to check this claim took
a random sample of 36 members of this health club and
found that they lost an average of 9.2 pounds within the
first month of membership with a standard deviation of
2.4 pounds. Find the p–value for this test. What will your
decision be if α = .01? What if α = .05?
Example: Solution
Step 1: H0: μ ≥ 10 H1: μ < 10

Step 2: The population standard deviation σ is known, the


sample size is large (n > 30). Due to the Central Limit Theorem,
we will use the normal distribution to find the p–value and
perform the test.
Example: Solution
Step 3:
s 2.4
sx = = = .40
n 36
x - µ 9.2 - 10
z= = = -2.00
sx .40

p-value = .0228.
Figure: The p-value for a left-tailed test.
Example: Solution
Step 4: Since α = .01 is less than the p-value of .0228, we
do not reject the null hypothesis at this significance level.
Consequently, we conclude that the mean weight lost
within the first month of membership by the members of
this club is 10 pounds or more.

Because α = .05 is greater than the p-value of .0228, we


reject the null hypothesis at this significance level.
Therefore, we conclude that the mean weight lost within
the first month of membership by the members of this
club is less than 10 pounds.
Example
The mayor of a large city claims that the average net worth
of families living in this city is at least $300,000. A random
sample of 25 families selected from this city produced a
mean net worth of $288,000.
Assume that the net worths of all families in this city have a
normal distribution with the population standard deviation
of $80,000. Using the 2.5% significance level, can you
conclude that the mayor’s claim is false?
Example: Solution
Step 1: H0 : μ ≥ $300,000 H1 : μ < $300,000

Step 2: The population standard deviation σ is known, the


sample size is small (n < 30), but the population distribution is
normal. Consequently, we will use the normal distribution to
perform the test.
Example: Solution

Step 3: α = .025
The < sign in the alternative hypothesis
indicates that the test is left-tailed.
Area in the left tail = α = .025.
The critical value of z is -1.96.
Figure
Example: Solution

Step 4:

s 80,000
sx = = = $16,000
n 25
x - µ 288,000 - 300,000
z= = = -.75
sx 16,000
Example: Solution
Step 5: This value of z = -.75 is greater
than the critical value of z = -1.96, and it
falls in the non-rejection region. As a
result, we fail to reject H0.
Therefore, we can state that based on the
sample information, it appears that the
mean net worth of families in this city is
not less than $300,000.
Connection between Hypothesis Tests
and Confidence Intervals

A close relationship exists between the test of a hypothesis for q, and the
confidence interval for q.

If [l, u] is a 100(1 - a)% confidence interval for the parameter q, the test of size a of
the hypothesis

H0: q = q0
H1: q ¹ q0

will lead to rejection of H0 if and only if q0 is not in the 100(1 - a)%


CI [l, u].

98
Confidence Interval Approach to Two-Tailed Tests About a
Population Mean
• Select a simple random sample from the population and use
the value of the sample mean 𝑥̅ to develop the confidence
interval for the population mean μ. (Confidence intervals are
covered in Unit 5.)
• If the confidence interval contains the hypothesized value μ0,
do not reject H0. Otherwise, reject H0. (Actually, H0 should be
rejected if μ0 happens to be equal to one of the end points of
the confidence interval.)

99
Confidence Interval Approach to Two-Tailed Tests About a Population Mean

The 97% confidence interval for μ is

Because the hypothesized value for the population mean, μ0 = 6, is not in this
interval, the hypothesis-testing conclusion is that the null hypothesis, H0: μ = 6,
can be rejected.

100
General Procedure for Hypothesis
Tests
1. Identify the parameter of interest.
2. Formulate the null hypothesis, H0 .
3. Specify an appropriate alternative hypothesis, H1.
4. Choose a significance level, a.
5. Determine an appropriate test statistic.
6. State the rejection criteria for the statistic.
7. Compute necessary sample quantities for calculating the test statistic.
8. Draw appropriate conclusions.
101
Tests on the Mean of a Normal Distribution, Variance Known

Consider the two-sided hypothesis test

H0: µ = µ0
H1: µ ≠ µ0

The test statistic is:

X - µ0
Z0 =
s/ n
102
Tests on the Mean of a Normal Distribution, Variance Known

Reject H0 if the observed value of the


test statistic z0 is either:
z0 > za/2 or z0 < -za/2

Fail to reject H0 if the observed value of


the test statistic z0 is
-za/2 < z0 < za/2

103
EXAMPLE: Propellant Burning Rate

Air crew escape systems are powered by a solid


propellant. The burning rate of this propellant is an
important product characteristic. Specifications require
that the mean burning rate must be 50 centimeters per
second and the standard deviation is s = 2 centimeters
per second. The significance level of a = 0.05 and a
random sample of n = 25 has a sample average burning
rate of x = 51.3 centimeters per second. Draw
conclusions.

104
EXAMPLE: Propellant Burning Rate

The seven-step procedure is

1. Parameter of interest: The parameter of interest is µ,


the mean burning rate.
2. Null hypothesis: H0: µ = 50 centimeters per second
3. Alternative hypothesis: H1: µ ¹ 50 centimeters per
second
4. Test statistic: The test statistic is: z = x - µ 0
0
s/ n
12/13/23 105
EXAMPLE: Propellant Burning Rate

5. Reject H0 if: Reject H0 if the P-value is less than 0.05. The boundaries of
the critical region would be z0.025 = 1.96 and -z0.025 = -1.96.

6. Computations: Since x = 51.3 and s = 2,


51.3 - 50
z0 = = 3.25
2/ 25
7. Conclusion: Since z0 = 3.25 and,
the p-value is = 2[1 - F(3.25)] = 0.0012,
we reject H0: µ = 50 at the 0.05 level of significance.

Interpretation: The mean burning rate differs from 50 centimeters per second, based
on a sample of 25 measurements.
106
Hypothesis Tests About a Population
Mean when σ unknown

Test Statistic to be used is


x - µ0
t=
s/ n
This test statistic has a t distribution with n - 1 degrees of
freedom.
P-Values for t Tests
Just as the P-value for a z test is the area under the z curve, the
P-value for a t test will be the area under the t- curve.

The number of df for the one-sample t test is n – 1.


P-Values for t Tests cont’d
HYPOTHESIS TESTS ABOUT μ: σ NOT KNOWN

Test Statistic
The value of the test statistic t for the sample
mean x is computed as
x -µ s
t= where s x =
sx n

The value of t calculated for x by using this formula


is also called the observed value of t.
Hypothesis Tests About a Population
Mean when σ unknown
Rejection Rule: p -Value Approach
Reject H0 if p –value < a
Rejection Rule: Critical Value Approach
H0: µ > µ0 Reject H0 if t < -ta

H0: µ < µ0 Reject H0 if t > ta


H0: µ = µ0 Reject H0 if t < - ta/2 or t > ta/2
Note: critical value approach is advisable in case of t-test statistic to avoid
complications as exact p-value is not available. Hence, an approximation or
interpolation is required to obtain p-value.
Rejection region approach (for t)
• If the observed value or the test statistic are between –p value
and +p value, the decision is that we fail to reject the null
hypothesis.

• Otherwise, if the observed value lies outside ± p, we reject the


null hypothesis.

12/13/23 112
EXAMPLE: Golf Club Design
An experiment was performed in which 15 drivers produced by a particular
club maker were selected at random and their coefficients of restitution
measured. It is of interest to determine if there is evidence (with a = 0.05) to
support a claim that the mean coefficient of restitution exceeds 0.82.
The observations are:
0.8411 0.8191 0.8182 0.8125 0.8750
0.8580 0.8532 0.8483 0.8276 0.7983
0.8042 0.8730 0.8282 0.8359 0.8660

The sample mean and sample standard deviation are x = 0.83725 and s =
0.02456. The objective of the experimenter is to demonstrate that the mean
coefficient of restitution exceeds 0.82, hence a one-sided alternative
hypothesis is appropriate.
113
The seven-step procedure for hypothesis testing is as follows:

1. Parameter of interest: The parameter of interest is the mean


coefficient of restitution, µ.

2. Null hypothesis: H0: µ = 0.82

3. Alternative hypothesis: H1: µ > 0.82

12/13/23 114
4. Test Statistic: The test statistic is x - µ0
t0 =
s/ n
5. Reject H0 if: Reject H0 if the P-value is less than 0.05.

6. Computations: Since x = 0.83725, s = 0.02456, µ = 0.82, and n = 15, we have


0.83725 - 0.82
t0 = = 2.72
0.02456/ 15
7. Conclusions: From t Table, for a t distribution with 14 degrees of freedom,
t0 = 2.72 falls between two values: 2.624, for which a = 0.01, and 2.977, for which a =
0.005.
Since, this is a one-tailed test the P-value is between those two values, that is, 0.005 < P
< 0.01. Therefore, since P < 0.05, we reject H0 and conclude that the mean coefficient of
restitution exceeds 0.82.

Interpretation: There is strong evidence to conclude that the mean coefficient of


restitution exceeds 0.82. 115
Extra
• For previous example, we can also say that p value for df 14,
and alpha 0.05 (for one tail, 0.025) is: 2.145.
• Also the t statistic or observed value is 2.72 which fails to lie in
–p to +p region, so we reject the null hypothesis.

12/13/23 116
Some Practical Tips
q A sample size of 30 provides good results in most cases.
If the population is skewed or has outliers, a sample size of
50 is preferred.
q The smaller the p-value, the greater the evidence
against the null H0 and hence in favour of the alternate
hypothesis H1.
q When the p-value is smaller than 0.01, the result is considered to be
very significant.
qWhen the p-value is between 0.01 and 0.05, the result is considered to
be significant.
qWhen the p-value is between 0.05 and 0.10, the result is considered by
some as marginally significant (and by most as not significant).
qWhen the p-value is greater than 0.10, the result is considered not
significant.
Hypothesis Tests
• Level of Significance:
• The level of significance is the probability of making a Type I error
when the null hypothesis is true as an equality.
• The person responsible for the hypothesis test specifies the level of
significance and the probability of making a Type I error.
• Applications of hypothesis testing that only control the Type I error
are called significance tests.
• Most applications of hypothesis testing control the probability of
making a Type I error; they do not always control the probability of
making a Type II error.
Hypothesis Tests
Table: Summary of Hypothesis Tests About a Population Mean
Case I: Testing means of a normal population with known s

Null hypothesis: H0 : µ = µ0

Test statistic value :

Alternative Hypothesis Rejection Region for Level a Test

120
Case I: Testing means of a normal population with known s

Rejection regions for z tests: (a) upper-tailed test; (b) lower-tailed test; (c) two-tailed test
121
Case III: Testing means of a
Normal population with unknown s, and small n

The One-Sample t Test


Null hypothesis: H0: µ = µ0

Test statistic value:

Alternative Hypothesis Rejection Region for a Level a


Test

122
Practice Questions

12/13/23 123
One-Tailed Tests About a Population Mean: σ Known

Example: Metro EMS

The response times for a random sample of 40 medical emergencies


were tabulated. The sample mean is 13.25 minutes. The population
standard deviation is believed to be 3.2 minutes.

The EMS director wants to perform a hypothesis test, with a .05 level
of significance, to determine whether the service goal of 12 minutes
or less is being achieved.

124
1. Develop the hypotheses.

2. Specify the level of significance. α = .05

3. Compute the value of the test statistic.


p –Value Approach
4. Compute the p –value.

For z = 2.47, the cumulative probability is 0.9932.


p-value = 1 – 0.9932 = 0.0068

5. Determine whether to reject H0.


Because p-value = 0.0068 ≤ α = 0.05, we reject H0.
There is sufficient statistical evidence to infer that Metro EMS is not meeting the
response goal of 12 minutes.

126
p –Value Approach
Critical Value Approach
p-Value Approach to Two-Tailed Hypothesis
Testing
• Compute the p-value using the following three steps:
1. Compute the value of the test statistic 𝑧.
2. If 𝑧 is in the upper tail (𝑧 > 0), compute the probability that 𝑧 is greater than or equal
to the value of the test statistic. If 𝑧 is in the lower tail (𝑧 < 0), compute the
probability that 𝑧 is less than or equal to the value of the test statistic.
3. Double the tail area obtained in step 2 to obtain the p-value.

• The rejection rule: Reject H0 if the p-value ≤ α.

129
Critical Value Approach to Two-Tailed
Hypothesis Testing
• The critical values will occur in both the lower and upper tails of the
standard normal curve.
• Use the standard normal probability distribution table to find 𝑧α/2
(the 𝑧-value with an area of α/2 in the upper tail of the distribution).
• The rejection rule is:
Two-Tailed Tests About a Population Mean: σ
Known
Example: Glow Toothpaste
The production line for Glow toothpaste is designed to fill tubes with
a mean weight of 6 oz. Periodically, a sample of 30 tubes will be
selected in order to check the filling process.
Quality assurance procedures call for the continuation of the filling
process if the sample results are consistent with the assumption that
the mean filling weight for the population of toothpaste tubes is 6
oz.; otherwise the process will be adjusted.

131
Assume that a sample of 30 toothpaste tubes provides
a sample mean of 6.1 oz. The population standard
deviation is believed to be 0.2 oz.
Perform a hypothesis test, at the 0.03 level of
significance, to help determine whether the filling
process should continue operating or be stopped and
corrected.
Two-Tailed Tests About a Population Mean: σ Known

1. Develop the hypotheses.

2. Specify the level of significance. α = 0.03

3. Compute the value of the test statistic.


Two-Tailed Tests About a Population Mean: σ Known
p –Value Approach
4. Compute the p –value.

For z = 2.74, the cumulative probability is 0.9969.


p-value = 2(1 – 0.9969) = 0.0062

5. Determine whether to reject H0.


Because p-value = 0.0062 ≤ α = 0.03, we reject H0.
There is sufficient statistical evidence to infer that the alternative hypothesis is true
(i.e. the mean filling weight is not 6 ounces).

134
p-Value Approach
Critical Value Approach
4. Determine the critical value and the rejection rule.

There is sufficient statistical evidence to infer that the alternative


hypothesis is true (i.e. the mean filling weight is not 6 ounes).
Critical Value Approach
Tests About a Population Mean: σ Unknown
Test Statistic:

This test statistic has a t distribution with n – 1 degrees of


freedom.

138
Tests about a Population Mean: σ Unknown

• Rejection Rule: p-value approach

• Rejection Rule: Critical value approach

139
p -Values and the t Distribution
• The format of the t distribution table provided in most statistics
textbooks does not have sufficient detail to determine the exact p-
value for a hypothesis test.
• However, we can still use the t distribution table to identify a
range for the p-value.
• An advantage of computer software packages is that the computer
output will provide the p-value for the t distribution.

140
Example: Highway Patrol
One-Tailed Test About a Population Mean: σ Unknown

A State Highway Patrol periodically samples vehicle speeds at


various locations on a particular roadway. The sample of vehicle
speeds is used to test the hypothesis H0: μ ≤ 65.

The locations where H0 is rejected are deemed the best locations for
radar traps. At Location F, a sample of 64 vehicles shows a mean
speed of 66.2 mph with a standard deviation of 4.2 mph. Use α =
0.05 to test the hypothesis. 141
One-Tailed Test About a Population Mean: σ
Unknown
1. Develop the hypotheses.

2. Specify the level of significance. α = .05

3. Compute the value of the test statistic.

142
One-Tailed Test About a Population Mean: σ
Unknown
p –Value Approach
4. Compute the p –value.

5. Determine whether to reject H0.


Because p-value < α = 0.05, we reject H0.
We are at least 95% confident that the mean speed of vehicles at Location F is
greater than 65 mph.

143
One-Tailed Test About a Population Mean: σ
Unknown
Critical Value Approach
4. Determine the critical value and the rejection rule.

5. Determine whether to reject H0.


Because 2.286 ≥ 1.669, we reject H0.
We are at least 95% confident that the mean speed of vehicles at Location F is
greater than 65 mph. Location F is a good candidate for a radar trap.

144
One-Tailed Test About a Population Mean: σ
Unknown

145
Example
At Canon Food Corporation, it used to take an average of 90 minutes for
new workers to learn a food processing job. Recently the company
installed a new food processing machine.
The supervisor at the company wants to find if the mean time taken by
new workers to learn the food processing procedure on this new machine is
different from 90 minutes.
A sample of 20 workers showed that it took, on average, 85 minutes for
them to learn the food processing procedure on the new machine. It is
known that the learning times for all new workers are normally distributed
with a population standard deviation of 7 minutes.
Find the p–value for the test that the mean learning time for the food
processing procedure on the new machine is different from 90 minutes.
What will your conclusion be if α = .01?
Solution

Step 1: H0: μ = 90 H1: μ ≠ 90

Step 2: The population standard deviation σ is known, the


sample size is small (n < 30), but the population
distribution is normal. We will use the normal distribution
to find the p–value and make the test.
Solution

Step 3:

s 7
sx = = = 1.56524758 min utes
n 20
x -µ 85 - 90
z= = = -3.19
sx 1.56524758

p-value = 2(.0007) = .0014


Figure: The p-value for a two-tailed test.
Example: Solution

Step 4: Because α = .01 is greater than the p-value of .0014, we reject the null
hypothesis at this significance level.

Therefore, we conclude that the mean time for learning the food processing
procedure on the new machine is different from 90 minutes.
Here we may also assume that for values beyond 3,
the area would be approximately 1, so for
calculating rejection region, let’s say of LHS, subtract
this half of approximately 1 value from 0.5 (because
that’s how we find significant region). The p value
thus could be thought of as some very small value
0.0000something, which is anyhow less than
alpha=0.01.
So, we reject null hypothesis.
151
Example
The management at Massachusetts Savings Bank is always concerned about the
quality of service provided to its customers. With the old computer system, a
teller at this bank could serve, on average, 22 customers per hour.

The management noticed that with this service rate, the waiting time for
customers was too long. Recently the management of the bank installed a new
computer system in the bank, expecting that it would increase the service rate
and consequently make the customers happier by reducing the waiting time.

To check if the new computer system is more efficient than the old system, the
management of the bank took a random sample of 70 hours and found that
during these hours the mean number of customers served by tellers was 27 per
hour with a standard deviation of 2.5. Testing at the 1% significance level,
would you conclude that the new computer system is more efficient than the
old computer system?
Example: Solution

Step 1: H0 : μ = 22 H1 : μ > 22

Step 2: The population standard deviation σ is not known and


the sample size is large (n > 30). Consequently, we will use the t
distribution to perform the test.
Example: Solution

Step 3: Significance level = .01. The > sign in the alternative


hypothesis indicates that the test is right-tailed and the
rejection region lies in the right tail.
Area in the right tail = α = .01.
df = n – 1 = 70 – 1 = 69.
The critical value for t for 69 df and .01 area in the right tail
is 2.382.
Figure
Example: Solution

Step 4:
s 2.5
sx = = = .29880715
n 70
x -µ 27 - 22
t= = = 16.733
sx .29880715

The value of the test statistic t = 16.733 is greater than the critical value of t = 2.382,
and it falls in the rejection region. Consequently, we reject H0. As a result, we
conclude that the value of the sample mean is too large compared to the
hypothesized value of the population mean, and the difference between the two
may not be attributed to chance alone.
One Sample t Test for Population Mean -
A car dealer offers generous package to customers who would like their purchasers to have
high quality extras fitted to the cars. Historically, people who access this offer spend £2300
per customer. The owner is concerned that recently this average spend has changed and
requested after discussions with a data analyst that this is tested. The analyst recommended
a one-sample t-test. To test this hypothesis, the data analyst checked the data for the last
five years to confirm that the population spend follows approximately a normal distribution
and then collects the spending data for the last seven customers (£): 2220, 2621, 2025, 1890,
2890, 2380, and 1890.
H0: μ = 2300
Population:
Sample:
H1: μ ≠ 2300
Normally distributed
n=7
(Two tail test)
μ = 2300, σ = unknown
α = 5% = 0.05

157
solution
Step 1 - State hypothesis
1. Null hypothesis H0: µ = 2300
2. Alternative Hypothesis H1: µ ≠ 2300 (the sign
implies a two-tail test)
Step 2 - Select test
• Number of samples - one sample.
• The statistic we are testing - testing for a difference between a sample mean and population mean (µ = 2300).
Therefore, two-tail test. Population standard deviation is not known.
• Size of the sample - small (n = 7).
• Nature of population from which sample drawn – normal population distribution, sample size is small, and
population standard deviation is unknown. The sample standard deviation will be used as an estimate of the
population standard deviation and the sampling distribution of the mean is a t distribution with n – 1 degrees
of freedom.

We conclude that one sample t test of


the mean is appropriate. 158
solution
Step 3 - Set the level of significance a = 0.05

Step 4 - Extract relevant statistic


The required distribution is a t distribution
given by equation:
Where, population mean = 2300, sample size n = 7,
Sample mean = 2273.71, and sample standard deviation
s = 380.99. Substituting these values into equation gives:

159
solution
Step 5 - Make a decision - Two alternative
approaches considered
From statistical tables, the two-tail critical
test statistic tcri = t (0.05/2, 6) = 2.45
The calculated test statistic tcal = - 0.18 and
the critical t value ± 2.45 are compared to
decide which hypothesis statement to
accept.

Given tcal (- 0.18) lies between the lower and


upper critical t values (-2.45 ® + 2.45), we
fail to reject H0. 160
Example

Grand Auto Corporation produces auto batteries. The company claims


that its top-of-the-line Never Die batteries are good, on average, for at
least 65 months.

A consumer protection agency tested 45 such batteries to check this


claim. It found the mean life of these 45 batteries to be 63.4 months
with a standard deviation of 3 months.

Find the p-value for the test that mean life of all such batteries is less
than 65 months. What will your conclusion be if the significance level is
2.5%?
Example: Solution

Step 1: H0 : μ ≥ 65 H1 : μ < 65

Step 2: The population standard deviation σ is not


known and the sample size is large (n > 30).
Consequently, we will use the t distribution to find the
p-value for the test.
Example: Solution

Step 3: The < sign in the alternative hypothesis indicates that the test is
left-tailed
s 3
sx = = = .44721360
n 45
x -µ 63.4 - 65
t= = = -3.578
sx .44721360

and df = n – 1 = 45 – 1 = 44
p-value < .001
Figure: The required p-value
Thank You!

12/13/23 165

You might also like