0% found this document useful (0 votes)
51 views82 pages

Unit5 Hypothesis Testing-1

Uploaded by

prit.desai.09
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)
51 views82 pages

Unit5 Hypothesis Testing-1

Uploaded by

prit.desai.09
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
You are on page 1/ 82

Hypothesis Testing

Kapil Rathor
Assistant Professor ( AI Department)
1. One sample
a. Mean with large sample
b. Mean with small sample using t test
c. Proportion test (in short)

2. Two sample
a. Mean Large sample diff
b. Mean small sample diff
c. Proportion diff
d. Paired t test
What is hypothesis
Deciding Which Distribution to Use in Hypothesis Testing
HYPOTHESIS TESTING OF MEANS WHEN THE POPULATION STANDARD DEVIATION IS KNOW
Hypothesis Testing Using the Standardized Scale
Rejection Area or Critical region Formation
Decision Making on Hypothesis Rejection
One-Tailed Test of Means
Step 4: Sketch the distribution and mark the sample value and the critical value

Step 5: Interpret the result


Final Conclusion : we should reject H0
HW
HW1
The mean diameter of a random sample of 70 tires is 102.5 cm. If the standard
deviation of the distribution of diameter of the population of tires is 2 cm, test the
hypothesis that the company is manufacturing tires with the mean diameter more
than 100 cm.

HW2
The mean height of a random sample of 121 cats is 32 cm. If the standard deviation
of the distribution of height of the population of cats is 2 cm, test the hypothesis that
the mean height of the population cats is not 35 cm. Take 95% confidence interval.
HYPOTHESIS TESTING OF PROPORTIONS:
LARGE SAMPLES Two-Tailed Tests of Proportions:

Given that
Step I – State the hypothesis types and significance level

Step II – Choos the appropriate distribution and find the critical region
As sample size n = 150 so Z test will be used for two tail hypothesis testing.
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and the critical values

Step 5: Interpret the result

Therefore, in this case, the president should reject the null hypothesis
From this, he should infer that the true proportion of promotable employees in the entire company is not 80
percent.
One-Tailed Tests of Proportions
Step II – Choos the appropriate distribution and find the critical region
As sample size n = 60 so Z test will be used for two tail hypothesis testing.
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and the critical value
Step 5: Interpret the result
EXAMPLE
HYPOTHESIS TESTING OF MEANS WHEN THE POPULATION STANDARD DEVIATION IS NOT KNOWN

If the sample size n is 30 or less and σ is not known, we should use the t distribution.
Two-Tailed Tests of Means Using the t Distribution
Step 1: State your hypotheses, type of test, and significance level

Step 2: Choose the appropriate distribution and find the critical value

Because the sample size is 20, the appropriate number of


degrees of freedom is 19, that is, 20 – 1. Therefore, we look in
the t distribution table,
Step 3: Compute the standard error and standardize the sample statistic

Step 4 Sketch the distribution and mark the sample value and the critical values
Step 5: Interpret the result
Drawing this result on a sketch of the sampling distribution, we see that the sample mean falls outside the
acceptance region, as shown in Figure. Therefore, management should reject the null hypothesis (the personnel
specialist’s assertion that the true mean score of the employees being tested is 90).
Example
A mobile phone manufacturing company claims that the mean life of its phones is 8 years. However, an investigating
agency found that the mean life of the phone takes the following values for a random sample of 5 phones.

5 years, 6 years, 8 years, 7 years, 10 years


Use t-test to test if the company’s claim is true at 5% level of significance.

and

Given
It’s a two tailed test, so with n-1=5-1=4 and
Since is lesser than the critical value . Hence, accept .
HW

A plastic chair manufacturing company claims that the mean life of its chairs is 10 years. A random sample of 6 chairs
found to have mean life with the following values.

10 years, 11 years, 9 years, 12 years, 10 years, 7 years


Use t-test to test if the company’s claim is valid at 5% level of significance.
Hypothesis testing :
Two sample test
Sampling Distribution for the Difference Between Two Population Parameters: Basic Concepts
The standard deviation of the distribution of the difference between the sample means is called the standard error of
the difference between two means and is calculated using this formula:
TESTS FOR DIFFEREN CES BETWEEN MEANS: LARGE SAMPLE SIZES

A manpower-development statistician is asked to determine whether the hourly wages of semiskilled workers are the same in
two cities. The results of this survey are presented in Table below. Suppose the company wants to test the hypothesis at the
0.05 level that there is no difference between hourly wages for semiskilled workers in the two cities:

Step 1: State your hypotheses, type of test, and significance level


Step 2: Choose the appropriate distribution and find the critical value
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and critical values

Step 5: Interpret the result Testing the difference between means

Thus, we reject the null hypothesis of no difference and conclude that the population means (the average
semiskilled wages in these two cities) differ.
Example
Suppose, there are two samples of electric tube lights, size of each sample is 625 units. It is found that the mean life
of tube lights from the first sample is 1900 hours and that for the tube lights from the second sample is 2090 hours. If
standard deviation in the life of tube lights from both the samples is 100 hours and 90 hours respectively, at 1 % level
of significance in equality, can we conclude that both the samples have significant difference in the mean life?

𝐻0: 𝜇1 = 𝜇2 and 𝐻1: 𝜇1 ≠ 𝜇2

Given 𝑥ҧ
1 = 1900, 𝑠1 = 100, 𝑛1 = 625

𝑥ҧ
2 = 2090, 𝑠2 = 90, 𝑛2 = 625

ሺ𝑥1
ҧ− 𝑥ҧ 2ሻ ሺ𝑥1 2ሻ
ҧ− 𝑥ҧ
𝑧 = =
𝜎𝑥ҧ1−𝑥ҧ
𝑠12 𝑠2

2
+ 2
𝑛1 𝑛2

1900 − 2090
𝑧 = = −35.3065
ට 100 + 90
2 2
625 625

It’s a two tailed test, so with ∝= 0.01, 𝑧∝ /2 = ±2.58

𝑧𝑐𝑎𝑙 = −35.3065 is less than the critical value 𝑧∝ /2 = −2.58. So, reject 𝐻0.
HW

Suppose, there are two sample lots of a food item. From the first lot of 200 sample packets of the food item, it is
observed that the mean weight of the food item is 30 grams with the standard deviation of 2 grams. From the second lot
of 210 sample packets of the food item, it is observed that the mean weight of the food item is 32 grams with the
standard deviation of 1 gram. Can we conclude that both the samples have significant difference in the mean weight?
(Take 5 % level of significance in equality)

Final Solution
Reject
TESTS FOR DIFFERENCES BETWEEN MEANS: SMALL SAMPLE SIZES

Our First task in performing the test is to calculate the standard error of the difference between the two means.
Because the population standard deviations are not known, we must use Equation

But for the small sample the above formula can not be used for standard error. We can use pooled variance for estimating
the variance of the difference.

Pooled Estimate of σ^2

For this test, we have n1 + n2 – 2


degrees of freedom
Estimated Standard Error of the Difference between Two Sample Means with Small Samples and Equal
Population Variances
Example
A consumer-research organization routinely selects several car models each year and evaluates their fuel efficiency. In
this year’s study of two similar subcompact models from two different automakers, the average gas mileage for 12 cars
of brand A was 27.2 miles per gallon, and the standard deviation was 3.8 mpg. The nine brand B cars that were tested
averaged 32.4 mpg, and the standard deviation was 4.3 mpg. At a = 0.01, should it conclude that brand A cars have lower
average gas mileage than do brand B cars?
Two-Tailed Tests for Differences between Proportions
Step 1: State your hypotheses, type of test, and significance level

Step 2: Choose the appropriate distribution and find the critical value
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and critical values

Step 5: Interpret the result


We can see in Figure that the standardized difference between the two sample proportions lies within the acceptance
region. Thus, we accept the null hypothesis and conclude that these two new compounds produce effects on blood
pressure that are not significantly different.
One-Tailed Tests for Differences between Proportions

manager wants to test at the 0.15 level of significance the hypothesis that the personal-appearance method produces
a lower proportion of errors. What should she do?
Step 1: State your hypotheses, type of test, and significance level

Step 2: Choose the appropriate distribution and find the critical value
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and critical value

Step 5: Interpret the result

This figure shows us that the standardized difference between the two sample proportions lies well within the
acceptance region, and the city manager should accept the null hypothesis that there is no difference between the
two methods of tax listing. Therefore, if mailed-in listing is considerably less expensive to the city, the city manager
should consider increasing the use of this method.
Example
A large hotel chain is trying to decide whether to convert more of its rooms to nonsmoking rooms. In a random sample of
400 guests last year, 166 had requested nonsmoking rooms. This year, 205 guests in a sample of 380 preferred the
nonsmoking rooms. Would you recommend that the hotel chain convert more rooms to nonsmoking? Support your
recommendation by testing the appropriate hypotheses at a 0.01 level of significance.
HW
In a random sample of 2000 wooden doors from India, 1900 are found to be of good quality. In a
random sample of 1800 wooden doors from China, 1650 are found to be of good quality. Do these
details indicate a significant difference between the quality of wooden doors from India and China?
(Take the level of significance 0.01)
EXAMPLE HW
In a test on the taste of mangos, 4500 out of 5000 mangos from Konkan are found tasty, and 5100 out of 6000
mangos from Pune are found tasty. Do these details indicate a significant difference in the taste of mangos from
Konkan and Pune? (Take 99% confidence interval)
TESTING DIFFERENCES BETWEEN MEANS WITH DEPENDENT SAMPLES
A health spa has advertised a weight-reducing program and has claimed that the average participant in the program loses
more than 17 pounds. A somewhat overweight executive is interested in the program but is skeptical about the claims and
asks for some hard evidence. The spa allows him to select randomly the records of 10 participants and record their weights
before and after the program. These data are recorded in Table below. Here we have two samples (a before sample and an
after sample) that are clearly dependent on each other, because the same 10 people have been observed twice. The
overweight executive wants to test at the 5 percent significance level the claimed average weight loss of more than 17
pounds.

Step 1: State your hypotheses, type of test, and significance level


Step 2: Choose the appropriate distribution and find the critical value
Step 3: Compute the standard error and standardize the sample statistic
Step 4: Sketch the distribution and mark the sample value and critical value

Step 5: Interpret the result

We see that the sample mean lies outside the acceptance region, so the executive can reject the null
hypothesis and conclude that the claimed weight loss in the program is legitimate.
HW

You might also like