probability & statistical inference lecture 5
DESCRIPTION
Probability & Statistical Inference Lecture 5. MSc in Computing (Data Analytics). Lecture Outline. Introduction to hypothesis testing Hypothesis Testing on the Mean. Hypothesis Testing. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/1.jpg)
PROBABILITY & STATISTICAL INFERENCE LECTURE 5MSc in Computing (Data Analytics)
![Page 2: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/2.jpg)
Lecture Outline Introduction to hypothesis testing Hypothesis Testing on the Mean
![Page 3: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/3.jpg)
Hypothesis Testing Statistical hypothesis testing and
confidence interval estimation of parameters are the fundamental methods used at the data analysis stage of a comparative experiment, in which the experimenter is interested, for example, in comparing the mean of a population to a specified value.
![Page 4: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/4.jpg)
Example For example, suppose that we are interested in
the burning rate of a solid propellant used to power aircrew escape systems.
Now burning rate is a random variable that can be described by a probability distribution.
Suppose that our interest focuses on the mean burning rate (a parameter of this distribution).
Specifically, we are interested in deciding whether or not the mean burning rate is 50 centimeters per second.
![Page 5: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/5.jpg)
Judicial Analogy
Hypothesis Significance Level
Collect Evidence Decision Rule
![Page 6: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/6.jpg)
Judicial Analogy A defendant is put on trial. They are
suspected of being guilty of crime. Determine the null hypothesis H0 and
the alternative hypothesis H1. The null hypothesis is what you assume to
be true when you start your analysis. It is the logical opposite of what you are tying to prove. In the judicial analogy: H0: The defendant is innocent H1: The defendant is guilty
![Page 7: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/7.jpg)
Judicial Analogy You select a significance level. In the
judicial example it is the amount of evidence needed to convict. In a court of law there must be enough evidence to convict ‘beyond a reasonable doubt’.
You collect evidence. You use the decision rule to make a
judgement. If the evidence is sufficiently strong, reject the null
hypothesis. The defendant is proven guilty not strong enough, do not reject the null
hypothesis.
![Page 8: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/8.jpg)
Coin Example You suspect that a coin is not fair and set out to prove that
it is not fair H0: The coin is fair H1: The coin is not fair
Significance level: If you observe more than 8 head or tails coin tosses out of ten you conclude the coin is not fair otherwise you state that there is not enough evidence
Toss the coin ten times and count the number of heads and tails
You evaluate the data using your decision rule that there is Enough evidence to reject the assumption that the coin is fair Not enough evidence to reject the assumption that the coin is
fair
![Page 9: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/9.jpg)
ExampleTests of Statistical Hypotheses
Decision criteria for testing H0: = 50 centimeters per second versus H1: 50 centimeters per second.
![Page 10: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/10.jpg)
Some DefinitionsThere is a chance you could be wrong!
![Page 11: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/11.jpg)
Errors in Hypothesis TestsActual
Decision H0 H1
H0 Correct Type II Error
H1 Type I error Correct
Sometimes the type I error probability is called the significance level, or the -error, or the size of the test
![Page 12: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/12.jpg)
Errors in Hypothesis Tests β = P(type II error) = P(fail to reject
H0 when H0 is false)
The power is computed as 1 - β, and power can be interpreted as the probability of correctly rejecting a false null hypothesis. We often compare statistical tests by comparing their power properties.
![Page 13: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/13.jpg)
Which Hypothesis is of interest Suppose you have a question about the
quantity of cereal is a box of cornflakes. You can use one of three types of test: A two tail test if you suspect the true
mean is different rather than claimed. An upper-tail test if you suspect the
true mean is higher than claimed A lower-tailed test if you suspect that
that the true mean is lower than claimed.
![Page 14: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/14.jpg)
Critical Regions Two tail test:
Upper tail test
Lower tail test
01
00
µ µ : Hµ µ : H
01
00
µ µ : Hµ µ : H
01
00
µ µ : Hµ µ : H
![Page 15: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/15.jpg)
General Steps in Hypotheses testing1. From the problem context, identify the parameter
of interest.2. State the null hypothesis, H0 .3. Specify an appropriate alternative hypothesis, H1.4. Choose a significance level, .5. Determine an appropriate test statistic.6. State the rejection region for the statistic.7. Compute any necessary sample quantities,
substitute these into the equation for the test statistic, and compute that value.
8. Decide whether or not H0 should be rejected and report that in the problem context.
![Page 16: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/16.jpg)
Tests on the Mean of a Normal Dist, σ Known Hypothesis Tests on the Mean
We wish to test:
The test statistic is:n
XZ/
__
0
![Page 17: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/17.jpg)
Tests on the Mean of a Normal Dist, σ Known Reject H0 if the observed value of the test
statistic z0 is either:z0 > z/2 or z0 < -z/2
Fail to reject H0 if -z/2 < z0 < z/2
![Page 18: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/18.jpg)
Example
![Page 19: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/19.jpg)
Example We can solve this problem by using the 8
steps as follows:
nXZ
/0
__
0
![Page 20: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/20.jpg)
Example
![Page 21: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/21.jpg)
Recap
Assumptions
• The population variance σ is known.• The sample means are normally distributed. (Invoke the CLT)
![Page 22: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/22.jpg)
Exercises The life in hours of a battery is known to be approximately
normally distributed with a standard deviation σ=1.25 hours. A random sample of 40 batteries has a mean life of hours. Is there evidence to support that battery life exceeds 40 hours? Use
α=0.05.
The mean water temperature downstream from a power plant cooling tower discharge pipe should be no more than 38oC. Past experience has indicated the standard deviation of the temperature is 1.1o. The water temperature measured on 35 randomly chosen days and the average temperature is found to be 37oC. Is there evidence that the water temperature is acceptable at α=0.05.
5.40__
x
![Page 23: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/23.jpg)
Hypothesis Tests on the Mean, σ2 unknown
![Page 24: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/24.jpg)
Two tail test:
Upper tail test
Lower tail test
01
00
µ µ : Hµ µ : H
01
00
µ µ : Hµ µ : H
01
00
µ µ : Hµ µ : H
![Page 25: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/25.jpg)
Example
![Page 26: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/26.jpg)
Example The sample mean and the standard
deviation s = 0.02456. The normal probability plot of the data on the next slides supports the assumption that the sample means come from a normal distribution. Use the 8 steps to test that the mean coefficient of restitution exceeds 0.82
83725.0__
x
![Page 27: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/27.jpg)
Normal probability plot of the coefficient of restitution data from the example.
Normal probability plot
![Page 28: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/28.jpg)
Example
![Page 29: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/29.jpg)
Exercise An article in a journal describes a study of thermal inertia
properties of autoclaved aerated concrete used as building material. Five samples of the material was tested in a structure, and the average interior temperate (oC) reported were as follows: 23.01, 22.22, 22.04, 22.62 and 22.59. Test the hypotheses H0: µ=22.5 versus H1: µ≠22.5 using α=0.05
Consider this computer output:
a) How many degrees of freedom are there on the t-test statistic
b) Fill in the missing quantitiesc) Test the hypotheses H0: µ=34.5 versus H1: µ≠34.5 using
α=0.05
Variable N Mean StDev SE Mean 95%CI t X 16 35.274 1.783 ? (34,324,36.224) ?
![Page 30: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/30.jpg)
Tests on a Population Proportion Large-Sample Tests on a Proportion
An appropriate test statistic is
![Page 31: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/31.jpg)
Tests on a Population Proportion
![Page 32: Probability & Statistical Inference Lecture 5](https://reader036.vdocuments.us/reader036/viewer/2022062411/5681697a550346895de177b8/html5/thumbnails/32.jpg)