0% found this document useful (0 votes)
21 views29 pages

Presentation3 - Hypothesis Testing

hypothesis testing

Uploaded by

cfchalimba
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)
21 views29 pages

Presentation3 - Hypothesis Testing

hypothesis testing

Uploaded by

cfchalimba
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/ 29

Analytics and Quantitative

Techniques
Introduction to Hypothesis Testing
Introduction to Hypothesis Testing
• Welcome to the session on Hypothesis Testing.
• Today, we will cover the fundamental concepts in Hypothesis Testing.

• Null and Alternative Hypotheses


• Type I and Type II Errors
• p-values and Significance Levels
• One-sample and Two-sample Tests

• We will also look at some real-world business examples to illustrate


these concepts.
Introduction to Hypothesis Testing
• Hypothesis testing is a fundamental method in statistics used to
decide whether there is enough evidence to reject a null
hypothesis.
• It involves comparing observed data with what we would expect
under the null hypothesis.
• Key elements include null and alternative hypotheses, Type I and
Type II errors, p-values, and significance levels.
Null and Alternative Hypotheses
• Null Hypothesis (H₀): A statement that there is no effect or no
difference. It's what we seek to test against.
• Example: H₀: The new sales strategy does not improve sales
performance.
• Alternative Hypothesis (H₁): A statement that there is an effect or
a difference. It's what we hope to support.
• Example: H₁: The new sales strategy improves sales performance.
• Example 2 (Finance):H0: The average return on investment (ROI)
is 8%.
• H1: The average return on investment (ROI) is not 8%.
Type I and Type II Errors
• Type I Error (α): Incorrectly rejecting the null hypothesis when it is
true (false positive).
• Example: Concluding that the new sales strategy improves sales when it
actually does not.
• Type II Error (β): Failing to reject the null hypothesis when it is
false (false negative).
• Example: Concluding that the new sales strategy does not improve sales
when it actually does.
p-values and Significance Levels
• p-value: The probability of observing the test results, or more
extreme results, under the null hypothesis.
• A small p-value (< 0.05) indicates strong evidence against the null
hypothesis.
• Significance Level (α): A threshold set by the researcher
(commonly 0.05) to decide whether to reject the null hypothesis.
• If p-value ≤ α, reject H₀; otherwise, do not reject H₀.
• Example:If p-value = 0.03 and α = 0.05, we reject H0 (The result is
statistically significant).
• If p-value = 0.08 and α = 0.05, we do not reject H0 (The result is not
statistically significant).
Example: Testing a New Sales Strategy
• Hypothesis: Does the new sales strategy improve sales
performance?
• Null Hypothesis (H₀): The new sales strategy does not improve
sales performance.
• Alternative Hypothesis (H₁): The new sales strategy improves
sales performance.
Example Data: Sales Figures
• Before Implementation (Old Strategy):
• Sample size (n₁) = 10
• Sales figures (in $): 200, 220, 210, 230, 240, 250, 220, 210, 205, 225
• After Implementation (New Strategy):
• Sample size (n₂) = 10
• Sales figures (in $): 250, 270, 260, 280, 290, 300, 270, 260, 255, 275
Step-by-Step Calculation
Step-by-Step Calculation (Variances)
Step-by-Step Calculation (Test Statistic)
• 3. Calculate Test Statistic (z):
Determine the p-value
• 4. Determine the p-value:
• Using standard normal distribution tables or software, find the p-
value corresponding to the calculated z-value (6.35).
• The p-value is very small (close to 0), indicating strong evidence
against the null hypothesis.
Conclusion
• Since the p-value is less than the significance level (0.05), we
reject the null hypothesis.
• Conclusion: There is significant evidence to support that the new
sales strategy improves sales performance.
One-sample Tests
• Used to determine whether the sample mean differs from a known
or hypothesized population mean.
• Formula for the test statistic (z):
Example 1: One-sample t-test
• Scenario: A coffee shop claims that the average wait time for
service is 5 minutes. A customer satisfaction survey measures the
wait time for 30 customers, yielding an average wait time of 5.5
minutes with a standard deviation of 1.2 minutes.
Example 1: One-sample t-test…
Example 1: One-sample t-test…
Example 1: One-sample t-test…

Conclusion: There is evidence to suggest that the average wait time


is significantly different from 5 minutes.
Example (Hospitality):

•A hotel claims the average stay is 3 nights.


•H0: μ = 3
•H1: μ ≠ 3
•Sample data: Mean = 3.2, SD = 0.5, n = 30
•Calculation:
Example (Hospitality):
•A hotel claims the average stay is 3 nights.
•H0: μ = 3
•H1: μ ≠ 3
•Sample data: Mean = 3.2, SD = 0.5, n = 30
•Calculation:
•t = (3.2 - 3) / (0.5 / √30) = 2.19
•Compare t to critical t-value at α = 0.05
• To find the critical t-value at α = 0.05 for a two-tailed test with 29 degrees of freedom (n-1), we
look up a t-table or use a calculator:
• Critical t-value for 29 degrees of freedom at α = 0.05 (two-tailed) ≈ 2.045
• Interpretation: Since 2.19 > 2.045, we reject the null hypothesis (H0). This means that there
is a statistically significant difference between the sample mean stay duration and the
claimed average stay duration of 3 nights.
Real-world Example: Finance
• Content:
• Scenario: Average ROI
• H0: μ = 8%
• H1: μ ≠ 8%
• Sample data: Mean = 7.5%, SD = 1.5%, n = 25
• Calculation:
Real-world Example: Finance
• Content:
• Scenario: Average ROI
• H0: μ = 8%
• H1: μ ≠ 8%
• Sample data: Mean = 7.5%, SD = 1.5%, n = 25
• Calculation:
• t = (7.5 - 8) / (1.5 / √25) = -1.67
• Compare t to critical t-value at α = 0.05
• To find the critical t-value at α = 0.05 for a two-tailed test with 24 degrees of
freedom (n-1), we look up a t-table or use a calculator:
• Critical t-value for 24 degrees of freedom at α = 0.05 (two-tailed) ≈ 2.064
• Interpretation: Since -1.67 < 2.064, we fail to reject the null hypothesis (H0). This
means that there is not enough evidence to conclude that the average ROI is
different from 8%.
Two-sample Tests
• Used to compare the means of two independent samples.
• Formula for the test statistic (z):
• OR

Where and are sample means, and are sample variances, and and are sample sizes
Example : Two-sample t-test
• Scenario: A company wants to compare the productivity of
employees who work from home versus those who work in the
office. Productivity is measured by the number of tasks completed
per week. Data is collected from 20 employees working from
home and 20 employees working in the office.
• Sample Data:
Example : Two-sample t-test…
Example : Two-sample t-test…

Conclusion: There is evidence to suggest that there is a significant difference in productivity between
employees working from home and those working in the office.
Real-world Example: Manufacturing

•Comparing defect rates of two production lines.


•H0: μ1 = μ2
•H1: μ1 ≠ μ2
•Sample data: Line A mean = 5%, Line B mean = 4%,
SD A = 1%, SD B = 1.2%, n A = 50, n B = 60
•Calculation:
Real-world Example: Manufacturing
•Comparing defect rates of two production lines.
•H0: μ1 = μ2
•H1: μ1 ≠ μ2
•Sample data: Line A mean = 5%, Line B mean = 4%,
SD A = 1%, SD B = 1.2%, n A = 50, n B = 60
•Calculation:
•t = (0.05 - 0.04) / √((0.01²/50) + (0.012²/60)) = 2.16
•Compare t to critical t-value at α = 0.05
• To find the critical t-value at α = 0.05 for a two-tailed test, we need to approximate the degrees of freedom.
• This can be done using a more complex formula, but for simplicity, let's assume approximately 108
degrees of freedom (conservative approach i.e. n1 + n2 – 2 = 50+60-2=108) :
• Critical t-value for 108 degrees of freedom at α = 0.05 (two-tailed) ≈ 1.98
• Interpretation: Since 2.16 > 1.98, we reject the null hypothesis (H0).
• This means that there is a statistically significant difference between the defect rates of the two
production lines.
Summary
• Hypothesis testing is a critical tool in business analytics.
• The steps include formulating hypotheses, calculating test
statistics, and interpreting p-values.
• Practical example shows how hypothesis testing can be used to
evaluate business strategies.

You might also like