Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
14 views48 pages

Module 3 Half

The document provides an overview of hypothesis testing, including definitions of null and alternative hypotheses, the significance level, and the p-value concept. It explains the process of testing claims using examples and introduces ANOVA as a method for comparing means across multiple groups. Additionally, it outlines various statistical tests such as the Wilcoxon Signed Rank Test and provides examples for practical application.

Uploaded by

jofiyo5372
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)
14 views48 pages

Module 3 Half

The document provides an overview of hypothesis testing, including definitions of null and alternative hypotheses, the significance level, and the p-value concept. It explains the process of testing claims using examples and introduces ANOVA as a method for comparing means across multiple groups. Additionally, it outlines various statistical tests such as the Wilcoxon Signed Rank Test and provides examples for practical application.

Uploaded by

jofiyo5372
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/ 48

Module-3

Testing of Hypothesis
Hypothesis: means a mere assumption or some supposition to be proved or
disproved.
NULL Hypothesis:
● If we are to compare method A with method B about its superiority and if
we proceed on the assumption that both methods are equally good, then
this assumption is termed as the null hypothesis.
● null hypothesis is generally symbolized as H0

Alternate Hypothesis:
● The method A is superior or the method B is inferior, we are then
stating what is termed as alternative hypothesis.
● The alternative hypothesis as Ha
Suppose we want to test the hypothesis that the population mean μ is
equal to the hypothesised mean μ H0 = 100.
Then we would say that the null hypothesis is that the population mean is
equal to the hypothesised mean 100 and symbolically we can express as:
The level of significance:
● This is a very important concept in the context of hypothesis testing.
● It is always some percentage (usually 5%) which should be chosen with great care, thought
and reason.
● In other words, the 5 per cent level of significance means that researcher is willing to take as
much as a 5 per cent risk of rejecting the null hypothesis when it (H0) happens to be true.

In a medical test, if a person without the In the same medical test, if a person with the
disease is incorrectly diagnosed as having the disease is incorrectly diagnosed as not having
disease (i.e., the test gives a positive result the disease (i.e., the test gives a negative
when it should have been negative), it is a result when it should have been positive), it is a
Type I error. Type II error.
The p-value is a measure used in statistical hypothesis testing to help determine the significance of your results. It represents
the probability of observing the data, or something more extreme, given that the null hypothesis is true.
The p-value helps answer the question: "If the null hypothesis is true, what is the probability of obtaining results at least as
extreme as those observed in the data?"

Interpreting the p-value:

● Low p-value (typically ≤ 0.05): This suggests that the observed data is unlikely under the null hypothesis, and
therefore, you may reject the null hypothesis in favor of the alternative hypothesis. In this case, the result is considered
statistically significant.

● High p-value (> 0.05): This indicates that the data is consistent with the null hypothesis, and you would fail to reject the
null hypothesis.

eX:

If you're testing whether a new drug is effective compared to a placebo, the null hypothesis (H₀) might be that there’s no
difference in effectiveness between the drug and placebo. If you get a p-value of 0.03, this means there’s a 3% chance of
observing the results (or something more extreme) if the drug had no effect. Since 0.03 is below 0.05, you could reject the null
hypothesis and conclude that the drug likely has an effect.
P-value approach
A phone industry manager thinks that customer monthly cell
phones bill 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.Test the manager's claim at 10%
level of significance using p-value approach.
● Claim: The manager believes average monthly bills have increased and
are now more than $52.

● Known population standard deviation (σ): $10

● Sample size (n): 64

● Sample mean : $53.10

● Significance level (α): 0.10

● Population mean under null hypothesis : $52


Step 1: State the Hypotheses
● Null Hypothesis (H₀): μ=52 (No increase; average bill is still $52)

● Alternative Hypothesis (H₁): μ>52 (There is an increase; bills are more than
$52)

This is a one-tailed (right-tailed) test since we are checking if the mean has
increased.
Step 2: Compute the Test Statistic

We use the Z-test here because the population standard deviation is known.

https://ztable.io/#examples
How to Use the Z-Table:(for value
0.88)
● Look at the row for 0.8 (this
gives the first digit and the first
decimal).

● Then go to the column for 0.08


(this gives the second decimal).

● At the intersection of row 0.8 and


column 0.08, you’ll find the
value:
0.3106+0.5=
0.8106
Why do we subtract this from 1?
Because we are doing a right-tailed test (checking if the mean is greater than 52), we want:

Compare p-value with α:


α = 0.10 p-value = 0.1894
Since:
p-value (0.1894)>α(0.10) → We fail to reject the null hypothesis.
Increase in Average Commute Time
A city planner believes that average commute times have
increased and now exceed 35 minutes. A random sample of 49
workers has an average commute time of 36.2 minutes. The
population standard deviation is known to be 6 minutes.
Test the planner’s claim at the 5% significance level using the
p-value approach.
Problem 2: Decrease in Soda Bottle Volume
A soda company claims that their bottles contain
exactly 500 ml of soda. A consumer protection group
suspects the volume has decreased. A sample of 36
bottles has a mean volume of 495.5 ml, with a known
population standard deviation of 10 ml. Test the claim
at the 1% significance level.
Problem 3: New Teaching Method
A school introduces a new teaching method and claims it improves student test scores above the national average of 70. A class of 64
students taught using this method has an average score of 72.4. The national standard deviation is 8. Test the school’s claim at the
10% level of significance using the p-value approach.

Problem 4: Average Electric Bill Decrease


An energy-saving program is expected to reduce household electricity bills. Last year, the average monthly bill was $120. After
implementing the program, a sample of 100 households showed a new average bill of $117, with a known population standard
deviation of $15. Test whether there has been a decrease in bills at the 5% significance level using the p-value approach.
ANOVA
ANOVA is a statistical technique used to analyze the differences between group means. It’s an extension of the t-test for comparing
only two groups, but ANOVA can handle multiple groups (more than two). It tests if the means of several groups are all equal, or if at
least one is different.

Why Use ANOVA?


● To compare more than two groups: While a t-test compares two groups, ANOVA can handle three or more groups, making it
more versatile for experiments involving multiple treatments, conditions, or groups.

● To test overall differences: ANOVA can test if any group differs significantly from the others, rather than comparing each pair
individually (which could increase the risk of error).
Types of ANOVA
● One-Way ANOVA:
It tests the impact of one factor (independent variable) on a dependent variable across multiple groups.
Example: Testing if the average test scores differ between students from three different schools.

● Two-Way ANOVA:
It examines two independent variables and their interaction to see how both factors affect the
dependent variable.
Example: Testing if test scores depend on both school type and gender.

● Repeated Measures ANOVA:


Used when the same subjects are measured multiple times.
Example: Testing blood pressure changes over time for the same group of people.
How Does ANOVA Work?
ANOVA tests whether any of the group means are statistically different from the others. It does this by comparing the variance within
groups to the variance between groups.

1. Within-group variance: Measures the variation within each group. This represents how much the data points in each group
deviate from their group mean.

2. Between-group variance: Measures the variation between the group means. This shows how different the group means are
from the overall mean of all groups.

If the between-group variance is much larger than the within-group variance, it suggests that at least one group mean is significantly
different from the others.
The Steps in ANOVA
Set up an analysis of variance table for the following per acre production data
for three varieties of wheat, each grown on 4 plots and state if the variety
differences are significant
Solution:
First we calculate the mean of each of these samples:
In this
problem k
represents
no. of wheat
varieties

In this
problem
n =12
because
.Each variety
of wheat has
4 values,so
3*4=12
v1=2 (row)
v2=9(col)
● The above table shows that the calculated value of F is 1.5
which is less than the table value of 4.26 at 5% level with
d.f. being v1 = 2 and v2 = 9 and hence could have arisen
due to chance.
i.e (calculated F value< table value)

● This analysis supports the null-hypothesis of no


difference is sample means.
Imagine a researcher wants to compare the average exam scores of three
different teaching methods (Method A, Method B, and Method C) on students.

calculate for One-Way ANOVA to determine if the average exam scores of the three groups are significantly different.
Problem 1: Coffee Shop Wait Times

A researcher wants to compare the average wait time (in minutes) at three different coffee shop chains: Starbean, BrewTime, and
BeanHouse. A random sample of wait times is collected:

● Starbean: 4.2, 5.1, 4.8, 5.3

● BrewTime: 6.1, 6.3, 5.9, 6.5

● BeanHouse: 5.0, 4.7, 5.2, 4.9

Use a One-Way ANOVA at the 0.05 significance level to determine if the mean wait times differ among the three chains.
Problem 2: Student Performance by Teaching Style

A school tries three different teaching methods to improve student performance. Students are randomly assigned to each method.
After a test, the following scores were recorded:

● Method A: 78, 85, 82, 88

● Method B: 92, 95, 91, 89

● Method C: 84, 86, 80, 83

Test whether there is a significant difference in average student performance across the methods at α = 0.01.
Problem 3: Weekly Sales Across Stores

A company wants to compare the weekly sales (in $1,000s) across three of its stores:

● Store X: 12, 15, 13, 14

● Store Y: 18, 17, 19, 20

● Store Z: 14, 16, 15, 15

Test at α = 0.05 if there's a significant difference in average sales among the stores.
Problem 4: Diet Plans and Weight Loss

A fitness expert is studying the effect of three diet plans on weight loss (in lbs) over 4 weeks:

● Diet A: 5, 6, 4, 5

● Diet B: 7, 8, 7, 6

● Diet C: 4, 5, 4, 3

Use ANOVA to determine if there’s a difference in the mean weight loss between diets at the 0.05 level.
Problem 5: Productivity by Work Environment

An experiment was conducted to test if work environment affects productivity (measured by number of tasks completed per day):

● Quiet Office: 24, 26, 25, 27

● Open Office: 22, 20, 21, 23

● Remote: 26, 27, 28, 26

At α = 0.05, test whether the mean productivity differs based on work environment.
MANN WHITNEY U TEST
RUN TEST
Wilcoxon Signed Rank Test: Concepts, Examples (vitalflux.com)

Wilcoxon Signed Rank Test | GeeksforGeeks

wilcoxonsignedranktest.pdf (statstutor.ac.uk)

The Wilcoxon Signed-Rank Test | Technology Networks

You might also like