0% found this document useful (0 votes)
27 views23 pages

pdf_merge

The document discusses various examples of hypothesis testing, including scenarios involving brands, judges, manufacturing processes, and employee opinions. It outlines the process of formulating null and alternative hypotheses, conducting statistical tests such as Z-tests and t-tests, and interpreting results to determine relationships or differences. Additionally, it covers the Chi-square test for independence between categorical variables.

Uploaded by

2023ac05887
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)
27 views23 pages

pdf_merge

The document discusses various examples of hypothesis testing, including scenarios involving brands, judges, manufacturing processes, and employee opinions. It outlines the process of formulating null and alternative hypotheses, conducting statistical tests such as Z-tests and t-tests, and interpreting results to determine relationships or differences. Additionally, it covers the Chi-square test for independence between categorical variables.

Uploaded by

2023ac05887
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/ 23

Session 9

Testing of Hypothesis-I
(Session 7: 3 / 4 August 2024)
Study the following examples Study the following examples
Suppose some data is given below, now how will Example 2:
you decide to purchase the brand? Two judges have to judge independently whether the
defendant is innocent or guilty on the basis of evidence.
Brands Sample size Mean (kms) SD (kms) Lack of sufficient evidence may lead to erroneous
A 30 38600 5000 decisions like false positive or false negative. Suppose
B 40 35450 6100 based on evidences, if we are interested in finding
which Judge has committed less or more false positivity
in the judgement compared to the other Judge.
How will you decide which Judge?
Slide 7 of 137 BITS Pilani, Pilani Campus Slide 8 of 137 BITS Pilani, Pilani Campus

Study the following examples Study the following examples


Suppose some data is given below, now how will Example 3:
you decide which Judge has committed less or A company manufactures impellers for use in jet-turbine
engines. One of the operations involves grinding a
more false positive judgements? particular surface finish of a titanium alloy component.
No. of Two different grinding processes can be used and both
No. of false False positive
Judges defendants processes can produce parts at identical mean surface
positives rate
(n)
roughness. The manufacturing engineer would like to
1 3000 90 3.00%
select the process having the least variability in surface
2 2500 48 1.92% roughness.
How to decide which process has the least variability?
Slide 9 of 137 BITS Pilani, Pilani Campus Slide 10 of 137 BITS Pilani, Pilani Campus

Study the following examples Study the following examples


Suppose some data is given below, now how will Example 4:
you decide which process has least variability? A company has developed three drying formulae for curing
glue.
No. of
Standard
Process defendants How to decide which formulae is better in curing the
deviation
(n) glue?
1 12 5.1
2 15 4.7

Slide 11 of 137 BITS Pilani, Pilani Campus Slide 12 of 137 BITS Pilani, Pilani Campus
Study the following examples Study the following examples
Suppose some data is given below, now how will Example 5:
you decide which formulae may be better? The opinion of a random sample of a few employees on
their pension plan and job classification obtained.
Formula A 13 10 8 11 8
Formula B 13 11 14 14 How to decide the pension plan and job classification
Formula C 4 1 3 4 2 4 are related/ associated?

Slide 13 of 137 BITS Pilani, Pilani Campus Slide 14 of 137 BITS Pilani, Pilani Campus

Study the following examples


Suppose some data is given below, now how will The previous FIVE examples will be answered
you find any relation/ association between pension through a statistical method called Testing of
plan and job classification? Hypothesis
Pension Plan
Job Classification 1 2 3 Total
Salaried workers 166 86 68 320
Hourly workers 84 64 32 180
Total 250 150 100 500
Slide 15 of 137 BITS Pilani, Pilani Campus Slide 16 of 137 BITS Pilani, Pilani Campus

Recapitulation Recapitulation
Population of Wages (per day) of employees of an organization Sample 1
3000 2486 820 1678 2070 2638 2490 1865 1000 2090 596 3200
1861 2495 1000 2497 1865 791 2090 2637 1327 1678
1680 2858 795 2495 2496 2501 1160 1480 1860 2490 Sample 2

2090 2840 2490 2640 659 827 2646 2638 2643 868 2840 2858 3000 2490 2998 3050 2070 2896 3200 2490 3280

1327 1866 1861 2486 2865 3011 2494 1489 1865 2855
Sample 3
2840 2499 2093 2660 1165 2600 2085 2640 2998 1861 2858 3240 2497 2865 656 2093 934 1861 868 795

2956 2495 2865 1865 3000 3019 1670 2858 2642 1680
Sample 4
3038 3000 1313 596 656 3240 590 2501 2485 3015
2086 1000 2497 596 656 875 2085 934 1313
2092 1679 3024 2497 2825 2630 2070 2900 1861 2636
2495 2637 2497 1159 2640 3050 870 2896 2500 2638 Sample 5
820 1313 3000 2640 596 2640 2600 2495 934 2500
926 2860 1481 875 2482 1860 2086 934 3200 2490
Slide 17 of 137 BITS Pilani, Pilani Campus Slide 18 of 137 BITS Pilani, Pilani Campus
True (not observable) value

5
Unbiased

Sampling error
Real difference

or a statement on the parameter(s) of the


Probability distribution

Null Hypothesis Alternative Hypothesis

Sampling variation

The mean milage of Brand A and Brand B tyres

Manager
Note: H can also be stated as one-tailed

Brand A Tyres Brand B Tyres


The mean milage of Brand A may be less than
The variable measured
fuel consumption
The mean milage of Brand A may be more than

The mean milage of Brand A and Brand B tyres


may be different

The proportion of false positive judgement between


the two Judges may be same

Suppose based on evidences, if we are interested in The proportion of false positive judgement by Judge
finding proportion of false positivity in the judgment of 1 may be lower than the proportion of false
two Judges
Formulate the hypotheses ???

The proportion of false positive judgement by Judge It is a statistical rule which decides whether to accept the null
hypothesis or not ?
judgement by Judge 2
Warning

Decision is made based on the sample not on the population

both Judges may be different


Leads to possibility of error between the decision
A statistical rule which decides whether to accept
Z-Test
or reject the null hypothesis on the basis of data
Small Sample Test n < 30 (Generally)
Unpaired t-Test
-test
Paired t-Test

of some probability assumption of 1-way ANOVA


Analysis of Variance
distribution probability distribution 2-way ANOVA

It is assumed that the data do not


follow any probability distribution

parameters.

Type II
decision Error

Correct Power
Error decision
State null and alternative hypotheses

Define the probability distribution the data follows

Define the rejection criteria/critical regional

Conclusion

Based on the sample data the


Z-test
test-statistic should be computed
Used for testing the
Mean of a single population (µ)

Difference between means of two populations (µ1 - µ2)


value of test-statistic then H0
either will not be rejected or Proportion of a single population (P)
rejected
Difference between proportions of two populations (P1 - P2)

The population variances


normal distribution

independent allocated randomly to


both groups
Parametric tests: Z-test for testing (µ - µ )

Define the critical region/ rejection criteria/ P - value

Define the critical region/ rejection criteria

Note: Assuming population variances are known

Define the critical region/ rejection criteria/ P - value Define the critical region/ rejection criteria/ P - value

Parametric tests: Z-test for testing (µ - µ ) Parametric tests: Z-test for testing (µ - µ )
Summary of One- and Two-Tail Tests
One-Tail Test One-Tail Test Two-Tail Test

right tail)

Test at 5% level of significance is there any significant


difference between the two brands of tyres
Parametric tests: Z-test for testing (µ - µ ) Parametric tests: Z-test for testing (µ - µ )

may be same

may be different

P value: The strength of the evidence against the null


hypothesis that the true difference in the
population is zero

P-value (or attained level of significance) is the lowest


level of significance at which the null hypothesis would
Possibility that the observed differences were a
chance event

Entire population need to be studied to know that a


difference is really present with certainty

level of uncertainty at which they could live

Parametric tests: Z-test for testing (P - P )

Note: Standard error of (p -p ) depends on n & n


Critical value for = 0.05 is

Reject H

Z = 2.55

t-test
observations

Suppose

Testing mean of a single population


In general, if there are n observations df = n-1
t-test Testing mean of single population (µ)

Define the critical region/ rejection criteria

Define the critical region/ rejection criteria Define the critical region/ rejection criteria

and the sample average milage may be same

The average milage of sports-car as claimed


may be higher than the sample average milage
0.05 > P > 0.015

Finding P - Value and Critical value Excel code


Level of significance ( ) 0.05
Degrees of freedom 9
t -statistic (t (observed)) 1.929
P - value (1-tailed) 0.043 T.DIST.RT(t, df)
Critical value (1-tailed) 1.833 T.INV( , df)
P - value (2-tailed) 0.086 T.DIST.2T(t, df) P-value is ???

Critical value (2-tailed) 2.262 T.INV.2T( , df)


population (µ1 µ2)

t-test Difference between means of two populations (µ - µ )

The manager of a courier service believes that packets delivered at the


beginning of the month are heavier than those delivered at the end of

at the beginning of the month and found that the mean weight was 5.25
kg. A randomly selected 10 packets at the end of the month had a mean

sample variances are 1.20 kg and 1.15 kg. At 5% level of significance,


can it be concluded that the packets delivered at the beginning of the
month weigh more? Also find P-value and 95% confidence interval for
the difference between the means.

Finding P - Value and Critical value Excel code

Degrees of freedom 23
t -statistic (t (observed)) 2.233
P - value (1-tailed) 0.018 T.DIST.RT(t, df)
t = 2.069 Critical value (1-tailed) 1.714 T.INV( , df)
observations

t-test
a single population (µd)

Assumptions

The sample size should be less than 30 (n < 30)

Subjects should be selected randomly

Define the critical region/ rejection criteria


But µ under H will be 0

P-value is
Finding P - Value and Critical value Excel code

P - value (1-tailed) 0.071 T.DIST.RT(t, df)


Critical value (1-tailed) 1.860 T.INV( , df)
P - value (2-tailed) 0.142 T.DIST.2T(t, df)
Critical value (2-tailed) 2.306 T.INV.2T( , df)

In a 2 x 2 contingency table, if one or more of the


cell has the expected cell frequencies is < 5,

For an r x c table, if the expected


frequencies in any cells are < 5,
merge the rows and columns
The sample size should not be less than 20.
Calculation
of expected
frequencies

To check the independence (no association) between the two


categorical variables, the statistical test used is Chi-square test
given by

The test-statistic follows Chi-square distribution with


(r-1)(c-1) degrees of freedom. r = # of rows, c = # of columns

H0: Timings of accident and its outcome are independent


(Not associated)

H1: Timings of accident and its outcome are independent


Chi-square test Chi-square test
Calculation of Chi-square statistic - 2
Observed Expected
Sl
frequencies frequencies
No
(Oi) (Ei)

1 80 69.3 10.7 114.49 1.652


2 200 210.7 -10.7 114.49 0.543
3 19 29.7 -10.7 114.49 3.855
4 101 90.3 10.7 114.49 1.268
2
Total 400 400 Chi-square statistic = 7.318
Slide 109 of 137 BITS Pilani, Pilani Campus Slide 110 of 137 BITS Pilani, Pilani Campus

Chi-square test Chi-square test


Hypothesis In an experiment to study the dependence of hypertension
H0: Timings of accident and its outcome are independent on smoking habits, the following data were taken on 180
(Not associated) individuals
H1: Timings of accident and its outcome are independent
Non Moderate Heavy
(Associated) Hypertension Total
2= 7.31 smokers smokers smokers

Yes 21 36 30 87
df = 1, Critical value at = 0.05 is 3.841, P = 0.007
No 48 26 19 93
Inference: There may be an association between
Total 69 62 49 180
timings of accident and its outcome
Slide 111 of 137 BITS Pilani, Pilani Campus Slide 112 of 137 BITS Pilani, Pilani Campus

Chi-square test Chi-square test


Hypothesis Calculation of expected frequencies

H0: Smoking habit and hypertension may be E1 = (r1 x c1)/n= (87 x 69)/180 = 33.35
independent (may not be associated) E2 = (r1 x c2)/n= (87 x 62)/180 = 29.97
E3 = (r1 x c3)/n= (87 x 49)/180 = 23.68
H1: Smoking habit and hypertension may not be E4 = (r2 x c1)/n= (93 x 69)/180 = 35.65
independent (may be associated)
E5 = (r2 x c2)/n= (93 x 62)/180 = 32.03
E6 = (r2 x c3)/n= (93 x 49)/180 = 25.32
Slide 113 of 137 BITS Pilani, Pilani Campus Slide 114 of 137 BITS Pilani, Pilani Campus
Chi-square test Chi-square test
Calculation of Chi-square statistic Interpretation
Sl No (Oi) (Ei)
H0: Smoking habit and hypertension may be
independent (may not be associated)
1 21 33.35 - 12.35 152.52 4.57
H1: Smoking habit and hypertension may not be
2 36 29.97 6.03 36.36 1.21
independent (may be associated)
3 30 23.68 6.32 39.94 1.69
2= 14.46
4 48 35.65 12.35 152.52 4.28
5 26 32.03 - 6.03 36.36 1.14 df = 2, Critical value at = 0.05 is 5.99, P < 0.001
6 19 25.32 - 6.32 39.94 1.58 Inference: There may be an association between
2
Total 180 180 Chi-square statistic = 14.46 smoking and Hypertension
Slide 115 of 137 BITS Pilani, Pilani Campus Slide 116 of 137 BITS Pilani, Pilani Campus

Chi-square test for Goodness-of-fit Chi-square test for Goodness-of-fit

A powerful test for testing the significance of the If Oi (i


discrepancy between theory and experiment was Frequencies and Ei (i
-square test set of expected (theoretical or hypothetical) frequencies,

for Goodness of then the Chi-square test statistic is given by

deviation of the experiment from theory is just by


chance or is it really due to the inadequacy of the
theory to fit the observed data.
follows Chi-square distribution with n 1 degree of freedom.
Slide 117 of 137 BITS Pilani, Pilani Campus Slide 118 of 137 BITS Pilani, Pilani Campus

Chi-square test for Goodness-of-fit Chi-square test for Goodness-of-fit


Example Under the null hypothesis, the expected frequency for
The following data shows the distribution of digits in 10 = 1000. The
numbers chosen at random from a telephone directory. The Chi-square value is
digits are:
Digits 0 1 2 3 4 5 6 7 8 9 Total
f 1026 1107 997 966 1075 933 1107 972 954 853 10000

H0: The digits occur uniformly frequently in the directory Since 2 = 58.542 < 16.919 (critical value, df = 9), it
can be infer that the digits are not uniformly
H1: The digits do not occur uniformly frequently in the directory distributed.
Slide 119 of 137 BITS Pilani, Pilani Campus Slide 120 of 137 BITS Pilani, Pilani Campus
Chi-square test for Goodness-of-fit Chi-square test for Goodness-of-fit

A consultant was employed by a city council to study the The probabilities are No. of
to be calculated Oi pi Ei
arrivals
pattern of bus arrival and departure at a very busy interstate using Poisson 0 10 0.0524 10.48 0.0220
distribution with = 1 13 0.1545 30.90 10.3693
bus terminus. She collected data from the arrival of 200 buses. 2.96 and x = 0, 1, 2, 2 45 0.2277 45.54 0.0064
Based on the data, the average arrival time was found to be = 3 49 0.2238 44.76 0.4016
results are as
2.96. She divided the arrivals into 6 categories. Assuming that 4 32 0.1651 33.02 0.0315
follows:
41 0.1765 35.30 0.9204
the arrivals follow Poisson distribution test whether the arrival 2
= 11.7512
distribution follows Poisson law. Use = 0.01. Since 2
= 3.402 < 13.27 (critical value at df = k-2 = 4), it can be
infer that the arrivals and departures follow Poisson law.
Slide 121 of 137 BITS Pilani, Pilani Campus Slide 122 of 137 BITS Pilani, Pilani Campus

Exercises 1 Exercises 2

Aircrew escape system are powered by a solid propellant. The A builder claims that solar water heater are installed in 70%

burning rate of this propellant is an important product of all homes being constructed today in a city. Would you

characteristic. Specification require that the mean burning rate agree with this claim if a random sample of new homes in
must be 50 cm/s. From past experience it is known that the this city shows that 28 out of 55 had heat pumps installed?
population SD is 2 cm/s. A sample of 25 solid propellant were What P-value and confidence interval are related in this
selected randomly to reconfirm the specification stated. The situation?
sample mean found was 51.3 cm/s. At 5% level of significance
what conclusion should be drawn?
Slide 123 of 137 BITS Pilani, Pilani Campus Slide 124 of 137 BITS Pilani, Pilani Campus

Exercises 3 Exercises 4

The management of a local health club claims that its members lose on
A cigarette manufacturing company claims that its brand A
the average 7 kgs or more within 3 months after joining the club. To
cigarettes outsells its brand B cigarettes by 8%. If it is
check this claim, a consumer agency took a random sample of 15
found that 42 out of a random sample of 200 smokers members of this health club and found that they lost an average of 6.26
prefer brand A and 18 out of 100 smokers prefer brand B, kgs within the first three months of membership. The sample standard

test at 5% level of significance, whether 8% difference a deviation 1.91 kgs. Test at 1% level of significance whether the claim
made by management of a local health club is acceptable or not? Also
valid claim. Also construct 95% CI for (P1-P2) and find P-
find the P-value of this test.
value.
Slide 125 of 137 BITS Pilani, Pilani Campus Slide 126 of 137 BITS Pilani, Pilani Campus
Exercises 5 Exercises 6
A taxi company manager is trying to decide whether the use of radial tires instead of regular Three different analytical tests can be used to determine the
belted tires improves fuel economy. 12 cars were equipped with radial tires and driven over a

regular belted tires and driven once again over the test course. The gasoline consumption in procedures and the results are shown in the following
kilometers per liter was recorded. Assume that the populations are normally distributed
tabulation. Is there sufficient evidence to conclude that the three

Belted tyres 4.3 3.9 5.2 5.9 5.8 4.4 4.7 5.8 5.9 3.7 4.9 4.9

-test?
(ii) Based on the data can we conclude that cars equipped with radial tires give better fuel

(iii) Find P-value


(iv) Construct 95% CI for difference in means.
(v) What is your inference

Exercises 7 Exercises 8

thermocouples. The sample means were 315, 303 and sample


Subject 1 2 3 4 5 6 7 8 9 10

Before
(a) Construct 95% CI for difference in means Weight 187 195 221 190 175 197 199 221 278 285
After

of two thermocouples at 5% level of significance effective in reducing weight?


Assume that the difference between before and after follow normal
distribution. Use = 0.05.

Exercises 9 Exercises 10

The opinion of a random sample of 500 employees are shown Examine whether there is any
below association between job
classification and pension plan
Exercises 11 Exercises 11 (contd)

Jaswant is interested in breeding flowers of a certain


species. The experimental breeding can result in four should come out in the ratio of 9 : 3 : 3 : 1. Jaswant found
possible types of flowers that under her experiment, out of 160 flowers that bloomed
(a) Megenta flowers with green stigma (MG) the number of flowers with types MG, MR, RG, and RR were

(c) Red flowers with green stigma (RG) = 0.05.

Exercises 12

A chemical company wishes to know if its sales of a liquid chemical are


normally distributed. This information will help them in planning and

days are as follow: Using


normally distributed. The sample mean and sample standard deviation
are 40 and 2.5 respectively.
34.0 - 35.5 - 37.0 - 38.5 - 40.0 - 41.5 - 43.0 - 44.5 -
in '000 < 34 > 46
35.5 37.0 38.5 40.0 41.5 43.0 44.5 46.0
liters

days

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy