0% found this document useful (0 votes)
12 views34 pages

Statistical Hypothesis Testing Guide

The document discusses the testing of statistical hypotheses, focusing on the null and alternative hypotheses, their definitions, and the testing process using z-tests and t-tests. It explains the conditions under which these tests are valid, the types of errors that can occur, and provides examples of hypothesis testing in various contexts. Additionally, it covers the p-value approach and the steps involved in conducting hypothesis tests.

Uploaded by

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

Statistical Hypothesis Testing Guide

The document discusses the testing of statistical hypotheses, focusing on the null and alternative hypotheses, their definitions, and the testing process using z-tests and t-tests. It explains the conditions under which these tests are valid, the types of errors that can occur, and provides examples of hypothesis testing in various contexts. Additionally, it covers the p-value approach and the steps involved in conducting hypothesis tests.

Uploaded by

pgpwe20009
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

• We have seen the following 2 results:

• This result is valid:


• When sample size is 30 or more, or
• When parent population has normal distribution

• This result is valid


• when sample size is 30 or more, or
• When

Gaurav Garg (IIM Lucknow)


Testing of Statistical Hypothesis (One Sample)

• Research and Statistical Hypothesis


• Testing Process
• Testing of Hypothesis about the unknown population mean
• z-test and t-test
• Testing of Hypothesis about the unknown population proportion

Gaurav Garg (IIM Lucknow)


Research and Statistical Hypothesis
• Research Hypothesis
• A statement of what the researcher believes will be the outcome of an experiment or a
study
• Examples:
• Older workers are more loyal to the company they work for.
• Companies with more than $1 billion of assets spend a higher percentage of their
annual budget on advertising than do companies with less than $1 billion of assets.
• Statistical Hypothesis
• A formal structure used to statistically test the research hypothesis using the sample
data.
• It is the claim about the value of the unknown parameter.
• Examples:
• The average monthly cell phone bill of the people in Lucknow is Rs. 1000.
• More than 80% of children above age 12 years in NCR use mobile phone.
• Statistical Hypothesis has two parts
• Null Hypothesis
• Alternative Hypothesis
Gaurav Garg (IIM Lucknow)
• The Null Hypothesis
• Denoted as H0
• It refers to the status quo (current or existing state of affairs)
• Nothing new is happening; the null condition exists
• It is usually a hypothesis of no difference.
• The average number of TV sets in U.S. Homes is three. (H0: μ = 3)
• The Alternative Hypothesis
• Denoted as H1 or Ha
• It is the opposite of the null hypothesis
• It challenges the status quo
• Something new is happening
• It is generally the hypothesis that the researcher is trying to prove
• The average number of TV sets in U.S. homes is not equal to 3 ( H1: μ ≠ 3 )
Gaurav Garg (IIM Lucknow)
• Example:
• Because of the increased marketing efforts, company officials believe the
company’s market share is now greater than 18%, and the officials would
like to prove it.

H 0 :  0.18
H1 :   0.18

Gaurav Garg (IIM Lucknow)


Testing Process
• The Null and Alternative Hypotheses are mutually exclusive.
• Only one of them can be true.
• There are three possible combinations of H0 and H1.
• Two-Tailed Test

• Right-Tailed Test
• or
• Left-Tailed Test
• or

• Begin with the assumption that the H0 is true.


• It is tested for possible rejection.
• If not rejected we accept H0.
• Similar to the notion of innocent until proven guilty.
Gaurav Garg (IIM Lucknow)
• Errors in Decision Making
Possible Hypothesis Test Outcomes
Actual Situation

Decision H0 True H0 False

Accept H0 No Error Type II Error


Probability 1 - α Probability β
Reject H0 Type I Error No Error
Probability α Probability 1 - β

Gaurav Garg (IIM Lucknow)


• Two types of error:
• Type I Error: Reject H0, when it is true
• Size of Type I Error = P(Type I Error)
• =P(Reject H0, when it is true)
• =α (Also called Producer’s risk)

• Type II Error: Accept H0, when it is wrong


• Size of Type II Error = P(Type II Error)
• =P(Accept H0, when it is wrong)
• =β (Also called Consumer’s risk)

• Size of Type I Error (α) is called the Level of Significance.


• α is set by the researcher in advance.
Gaurav Garg (IIM Lucknow)
• Claim: the average age of Lucknow’s population is 50 years.
• H0: μ = 50, H1: μ ≠ 50
• Take a sample and find sample mean
• Suppose the sample mean age is 20 years.
• This is significantly lower than the claimed mean population age of 50
years.
• If the claim is true, getting a sample mean of 20 is very unlikely.
• If the sample mean is close to the assumed population mean, H0 is accepted.
• If the sample mean is far from the assumed population mean, H0 is rejected.
• How far is “far enough” to reject H0?
• The critical value of the test statistic is used to decide on this.
Gaurav Garg (IIM Lucknow)
• Critical value divides the whole area under the probability curve into two
regions:
• Critical (Rejection) region
• When the statistical outcome falls into this region, H0 is rejected.
• Size of this region is α.
• Acceptance Region
• When the statistical outcome falls into this region, H0 is accepted.
• Size of this region is (1-α).
• We know,
• This result is valid:
• When the sample size is 30 or more, or
• When the parent population has a normal distribution
• So, we consider here the probability curve of N(0,1)
• Statistical outcome mentioned above is the value
Gaurav Garg (IIM Lucknow)
Acceptance Region
(1- a)

Region of Region of
Rejection Rejection
a/2 a/2

Critical Values

Two-Tailed Test

Gaurav Garg (IIM Lucknow)


1- a a

0
Right-Tailed Test

a 1- a

0
Left-Tailed Test

Gaurav Garg (IIM Lucknow)


Testing of Hypothesis for µ (z-test)
• Conditions/ Assumptions:
• Population is normal or n ≥ 30
• σ is known or n ≥ 30
• Test Statistic:
• Steps:
1. Write the H0 and H1 statements.
2. Check the conditions mentioned above.
3. Compute the value of the test statistic using the formula mentioned above.
• In the formula, use the hypothesized value of (that is taken under H0)
• If is unknown, use sample standard deviation s1
4. Fix the level of Significance α (mostly taken as 0.05) and Obtain the Critical Values using Excel or
the Statistical Table
• Excel Formula
• For TTT: [Link](α/2) and [Link](1 - α/2)
• For RTT: [Link](1- α)
• For LTT: [Link](α)
5. Make the probability curve of N(0,1), mark the rejection region, place Zc. If Zc lies in the rejection
Gaurav Garg (IIM Lucknow)
region, reject H0
• Example:
• A survey, done 10 years ago, of CPAs in the U.S. found that their average salary was
$74,914.
• A sample of 112 CPAs gave a mean salary of $78,695 and a standard deviation of
$14,530.
• An accounting researcher would like to test whether over the years
• has the average salary increased?
• has the average salary decreased?
• has the average salary changed?

Gaurav Garg (IIM Lucknow)


• Has the average salary of CPAs in the U.S. increased?
• Step 1:
• (Right-tailed Test) N(0,1)
• Step 2: (0.05)

(0.95)
• Step 3:
• Test Statistic:
• Step 4: 1.645
• Let us fix α=0.05, Critical Value = [Link](1-0.05) = 1.645.
• Step 5:
• See the Graph
• Since, computed value > critical value at 5% level of significance
• we reject at 5% level of significance in favor of
• and conclude that average salary of CPAs in the U.S. has increased.
Gaurav Garg (IIM Lucknow)
• Has the average salary of CPAs in the U.S. decreased?
• Step 1:
• (Left-tailed Test)
• Step 2:
0.0 0.95
• Step 3: 5
• Test Statistic:
-1.645 0
• Step 4:
• Let us fix α=0.05, Critical Value = [Link](0.05) = -1.645.
• Step 5:
• See the Graph
• Since, computed value > critical value at 5% level of significance
• we can not reject at 5% level of significance in against of
• and conclude that average salary of CPAs in the U.S. has not decreased.
Gaurav Garg (IIM Lucknow)
• Has the average salary of CPAs in the U.S. changed?
• Step 1:
• (Two-tailed Test)
• Step 2:
0.025 0.025
• Step 3: 0.95
• Test Statistic:
• Step 4:
• Let us fix α=0.05, -1.96 1.96
• Critical Values = [Link](1-0.025) = 1.96.
• And [Link](0.025) = -1.96
• Step 5:
• See the Graph
• Since, |computed value| > |critical value| at 5% level of significance
• we reject at 5% level of significance in favor of
• and conclude that average salary of CPAs in the U.S. has changed.
Gaurav Garg (IIM Lucknow)
• p – value Approach
• Let Zc be the computed value of the test statistic and Z ~ N(0,1)
• Then p – value is given by the following probability

• For two-tailed tests: 2P(Z> |Zc|)


• Excel Formula: 2*([Link](ABS(Zc),1))

• For right-tailed tests: P(Z> Zc)


• Excel Formula: [Link](Zc,1))

• For left-tailed tests: P(Z< Zc)


• Excel Formula: [Link](Zc,1))

• Decision: H0 is rejected in favor of H1 at α ×100% level of significance,


• If p – value < α
• The p – value is the smallest level of significance at which H0 would be rejected.
Gaurav Garg (IIM Lucknow)
• Example:
• A phone industry manager thinks that customer monthly cell phone bills have increased, and now
average more than $52 per month.
• The company wishes to test this claim.
• Suppose a sample is taken with the following results
• Sample size = 64, sample mean = $53.1 per month
• Past company records indicate that the standard deviation is about $10.
• To Test
• H0: μ = 52 Against H1: μ > 52
• Test Statistic: x μ 53.1  52
Zc   0.88
σ 10
n 64

Gaurav Garg (IIM Lucknow)


PZ  Z c   P(Z  0.88 ) 1  0.8106 0.1894

p-value = 0.1894
Zc = 0.88
Reject H0
 = 0.10

0
Do not reject H0 1.28 Reject H0

Do not reject H0 since p-value = 0.1894 >  = 0.10

Gaurav Garg (IIM Lucknow)


• Consider the example of the average salary of CPAs in the U.S.
• Computed value of test statistic, Zc = 2.7539
• For two-tailed tests (H0: μ = 74914, H1: μ ≠ 74914)
• p-value = 2P(Z > 2.7539) = 0.005888 (using N(0,1))
• H0 is rejected for all α ≥ 0.005888
• For right-tailed tests (H0: μ = 74914, H1: μ > 74914):
• p-value = P(Z > 2.7539) = 0.002944
• H0 is rejected for all α ≥ 0.002944
• For left-tailed tests (H0: μ = 74914, H1: μ < 74914):
• p-value = P(Z < 2.7539) = 0.997056
• H0 is rejected for all α ≥ 0.997056
• We can not have this high value of α
• So, we accept H0

Gaurav Garg (IIM Lucknow)


• Example:
• An insurance agent claims that the average age of policy holders who have insured
through him is less than the average for all agents, which is 30.5 years.
• A random sample of 100 policy holders who had insured through him gave the
following age distribution: Age no. of people
16-20 12
21-25 22
26-30 20
31-35 30
36-40 16

• Test his claim at 5% level of significance.

Gaurav Garg (IIM Lucknow)


• Example:
• An engineer has developed a new, energy-efficient lawn mower engine.
• He claims that the engine will run continuously for an average of at least 300
minutes on a single gallon of regular gasoline.
• Suppose a simple random sample of 50 engines is tested.
• The engines run for an average of 295 minutes, with a standard deviation of 20
minutes.
• Test the appropriate hypothesis.

Gaurav Garg (IIM Lucknow)


Testing of Hypothesis for µ (t-test)
• Conditions/ Assumptions:
• n<30; Population is normal; σ is unknown.
• Test Statistic:
• Steps:
1. Write the H0 and H1 statements.
2. Check the conditions mentioned above.
3. Compute the value of the test statistic using the formula mentioned above.
4. Fix the level of Significance α and Obtain the Critical Values using t distribution
with (n-1) degree of freedom ().
• Excel Formula
• For TTT: [Link](α/2,n-1) and [Link](1 - α/2 ,n-1)
• For RTT: [Link](1- α ,n-1)
• For LTT: [Link](α ,n-1)
5. Make the probability curve of t distribution with (n-1) degree of freedom, mark
the rejection region, place Tc. IfGaurav
Tc lies in the rejection region, reject H0
Garg (IIM Lucknow)
• For right tail test (H0: μ = μ0, H1: μ > μ0): t
α
• P( T < tα) = 1- α T~t(n-1)
Rejection
• P(T > tα ) = α Region (α)
Acceptance
Region (1- α)


• For left tail test (H0: μ = μ0, H1: μ < μ0): -t
α
• P( T > -tα) = 1- α
T~t(n-1)
• P(T < -tα ) = α Rejection
Region (α)
Acceptance
Region (1- α)

-tα

Gaurav Garg (IIM Lucknow)


• For two tail test (H0: μ = μ0, H1: μ ≠ μ0): tα/2
T~t(n-1)

Rejection Rejection
Region (α/2) Acceptance Region (α/2)
Region (1- α)

- tα/2 tα/2

• P(- tα/2 < T< tα/2 ) = 1- α


• P(T > tα/2 ) = α/2 P( T < -tα/2 ) = α/2
• We reject H0 in the favor of H1 at α x100% level
• If |Tc| > tα/2 (for two-tailed test)
• If Tc > tα (for right-tailed test)
• If Tc < -tα (for left-tailed test)
Gaurav Garg (IIM Lucknow)
• Example:
• A sample of 25 people is taken.
• The length of time to prepare dinner is recorded in minutes, as given
below:
• 44.0 51.9 49.7 40.0 55.5 33.0 43.4 41.3 45.2 40.7
41.1 49.1 30.9 45.2 55.3 52.1 55.1 38.8 43.1 39.2 58.6
49.8 43.2 47.9 46.6
• Is there any evidence that the population mean time to prepare dinner
is greater than 40 minutes?
• Use a level of significance of 0.05.
• Computed value of Test Statistic = 4.04388267

Gaurav Garg (IIM Lucknow)


• Example:
• The mean tariff of a hotel room in New York is said to be $168 per
night.
• A random sample of 25 hotels resulted in mean tariff $172.50 with
standard deviation $15.40.
• Test at the  = 0.05 level:
• if the mean tariff of a hotel room in New York is more than $168 per
night;
• if the mean tariff of a hotel room in New York is not $168 per night.
• A stem-and-leaf display and a normal probability plot indicate the
data are approximately normally distributed.
• Computed Value of Test Statistic = 1.461039
Gaurav Garg (IIM Lucknow)
• p – value Approach in t-test
• Let Tc be the computed value of the test statistic and T ~t(n-1)
• Then p – value is given by the following probability

• For two-tailed tests: 2P(T> |Tc|)


• Excel Formula: 2*([Link](ABS(Tc),n-1,1))

• For right-tailed tests: P(T> Tc)


• Excel Formula: [Link](Tc, n-1,1))

• For left-tailed tests: P(T< Tc)


• Excel Formula: [Link](Tc, n-1,1))

• Decision: H0 is rejected in favor of H1 at α ×100% level of significance,


• If p – value < α
Gaurav Garg (IIM Lucknow)
Testing of Hypothesis for μ

σ known σ Unknown

n small n large n small n large

Sample must come from Sample must come from a


a normal population normal population

Z test t test. Z test.


. . .
For critical value/ p-value: For critical value/ p-value: For critical value/ p-value:
Use N(0,1) Use t(n-1) Use N(0,1)

Gaurav Garg (IIM Lucknow)


Hypothesis Testing of Population Proportion 𝝅
• Example:
• A manufacturer believes that at most 15% of its products contain at least
one minor flaw.
• The company wants to test this belief.
• A sample of 200 products resulted in 33 items having at least one minor
flaw.
• Population is divided into two mutually exclusive and exhaustive classes
based on an attribute.
• One class possessing that attribute
• Other class not possessing that attribute
• 𝝅= Population proportion of individuals or items possessing the attribute under study
• p= sample proportion of individuals or items possessing the attribute under study

Gaurav Garg (IIM Lucknow)


• We want to test:
• (Right-tailed Test)
• (Left-tailed Test)
• (Two-tailed Test)
• Test Statistic:

• Condition: Sample is large.



• We have seen,
• So, N(0,1) distribution is used to obtain critical value.
• Decision rules are the same as discussed earlier.
• p – value approach can also be used.
Gaurav Garg (IIM Lucknow)
• Example:
• A marketing company claims that it receives at least 8% responses of the online
questionnaires sent to potential customers.
• To test this claim, a random sample of 500 was surveyed with 30 responses.
• Test the appropriate hypothesis.

• (large sample)

Reject H0
• Critical Value = -1.645
0.05
• Reject H0 at α = 0.05 Accept H0

-1.645 0

Gaurav Garg (IIM Lucknow)


• Example
• A manufacturer claims that at most 15% of its products contain at least one minor
flaw.
• The company wants to test this belief.
• A sample of 200 products resulted in 33 items having at least one minor flaw.
• Test the claim.
• Example:
• A political group ABC Party claims that the proportion of voters who support it is
more than 0.4.
• A news channel conducted a survey to test this claim.
• A sample of 200 people is selected.
• Out of them only 65 are the supporters of ABC Party.
• Can you help the news channel with the analysis?
Gaurav Garg (IIM Lucknow)

You might also like