Download presentation
Presentation is loading. Please wait.
1
Hypothesis Testing – Introduction
Hypothesis: A conjecture about the distribution of some random variables. A hypothesis can be simple or composite. A simple hypothesis completely specifies the distribution. A composite does not. There are two types of hypotheses: The null hypothesis, H0, is the current belief. The alternative hypothesis, Ha, is your belief; it is what you want to show. STA286 week 10
2
Examples Each of the following situations requires a significance test about a population mean . State the appropriate null hypothesis H0 and alternative hypothesis Ha in each case. The mean area of the several thousand apartments in a new development is advertised to be 1250 square feet. A tenant group thinks that the apartments are smaller than advertised. They hire an engineer to measure a sample of apartments to test their suspicion. (b) Larry's car consume on average 32 miles per gallon on the highway. He now switches to a new motor oil that is advertised as increasing gas mileage. After driving 3000 highway miles with the new oil, he wants to determine if his gas mileage actually has increased. (c) The diameter of a spindle in a small motor is supposed to be 5 millimeters. If the spindle is either too small or too large, the motor will not perform properly. The manufacturer measures the diameter in a sample of motors to determine whether the mean diameter has moved away from the target. STA286 week 10
3
Test Statistic The test is based on a statistic that estimate the parameter that appears in the hypotheses. Usually this is the same estimate we would use in a confidence interval for the parameter. When H0 is true, we expect the estimate to take a value near the parameter value specified in H0. Values of the estimate far from the parameter value specified by H0 give evidence against H0. The alternative hypothesis determines which directions count against H0. A test statistic measures compatibility between the null hypothesis and the data. We use it for the probability calculation that we need for our test of significance It is a random variable with a distribution that we know. STA286 week 10
4
Example An air freight company wishes to test whether or not the mean weight of parcels shipped on a particular root exceeds 10 pounds. A random sample of 49 shipping orders was examined and found to have average weight of 11 pounds. Assume that the stdev. of the weights () is 2.8 pounds. The null and alternative hypotheses in this problem are: H0: μ = 10 ; Ha: μ > 10 . The test statistic for this problem is the standardized version of Decision: ? STA286 week 10
5
Testing Process Hypothesis testing is a proof by contradiction.
The testing process has four steps: Step 1: Assume H0 is true. Step 2: Use statistical theory to make a statistic (function of the data) that includes H0. This statistic is called the test statistic. Step 3: Find the probability that the test statistic would take a value as extreme or more extreme than that actually observed. Think of this as: probability of getting our sample assuming H0 is true. Step 4: If the probability we calculated in step 3 is high it means that the sample is likely under H0 and so we have no evidence against H0. If the probability is low it means that the sample is unlikely under H0. This in turn means one of two things; either H0 is false or we are unlucky and H0 is true. STA286 week 10
6
Example STA286 week 10
7
Graphical Representation
Let Sn be the set of all possible samples of size n from the population we are sampling from. Let C be the set of all samples for which we reject H0. It is called the critical region. is the set of all samples for which we fail to reject H0. It is called the acceptance region. STA286 week 10
8
Decision Errors When we perform a statistical test we hope that our decision will be correct, but sometimes it will be wrong. There are two possible errors that can be made in hypothesis test. The error made by rejecting the null hypothesis H0 when in fact H0 is true is called a type I error. The error made by failing to reject the null hypothesis H0 when in fact H0 is false is called a type II error. STA286 week 10
9
Size of a Test The probability that defines the critical region is called the size of the test and is denoted by α. The size of the test is also the probability of type I error. Example... STA286 week 10
10
Power The probability that a fixed size test will reject H0 when H0 is false is called the power of the test. Power is not about an error. We want high power. Example… STA286 week 10
11
Decision Rules A hypothesis test is a decision made where we attach a probability of type I error and fix it to be α. However, for any set up there are lots of decision rules with the same size. Example: STA286 week 10
12
Simple versus Composite Hypothesis
Recall, a simple hypothesis completely specifies the distribution. A composite does not. When testing a simple null hypothesis versus a composite alternative, the power of the test is a function of the parameter of interest. In addition, the power is also affected by the sample size. STA286 week 10
13
Example STA286 week 10
14
Test for Mean of Normal Population σ2 is known
Suppose X1, …, Xn is a random sample from a N(μ, σ2) distribution where σ2 is known. We are interested in testing hypotheses about μ. The test statistics is the standardized version of the sample mean . We could test three sets of hypotheses… STA286 week 10
15
Example The Pfft Light Bulb Company claims that the mean life of its 2 watt bulbs is 1300 hours. Suspecting that the claim is too high, Nalph Rader gathered a random sample of 64 bulbs and tested each. He found the average life to be 1295 hours. Test the company's claim using = Assume = 20 hours. STA286 week 10
16
Exercise A standard intelligence examination has been given for several years with an average score of 80 and a standard deviation of 7. If 25 students taught with special emphasis on reading skill, obtain a mean grade of 83 on the examination, is there reason to believe that the special emphasis changes the result on the test? Use = 0.05. STA286 week 10
17
Minitab Example Data on the Degree of Reading Power (DRP) scores for 44 students are recorded after they took a reading course. We wish to test whether the mean DRP of these students is greater than the mean DRP in the population which is known to be 32. The MINITAB output for the test is given below. Z-Test Test of mu = vs mu > 32.00 The assumed sigma = 11.0 Variable N Mean StDev SE Mean Z P DRP Scor MINITAB Command Stat > Basic Statistics > 1 Sample Z and select ‘Test mean’ STA286 week 10
18
Test for Mean of Normal Population σ2 is unknown
Suppose X1, …, Xn is a random sample from a N(μ, σ2) distribution where σ2 is unknown, n is small and we are interested in testing hypotheses about μ. The test statistics is... STA286 week 10
19
Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 6 representative gardens where sewage sludge was used as fertilizer. The following measurements (in mg/kg of dry weight) were obtained. Cd: Is there evidence that the mean concentration of Cd is higher than 12? STA286 week 10
20
MINITAB commands: Stat > Basic Statistics > 1-Sample t
MINITAB outputs for the above problem: T-Test of the Mean Test of mu = vs mu > 12.00 Variable N Mean StDev SE Mean T P Cd T Confidence Intervals Variable N Mean StDev SE Mean % CI Cd (6.79, 29.21) STA286 week 10
21
Test for Mean of a Non-Normal Population
Suppose X1, …, Xn are iid from some distribution with E(Xi)=μ and Var(Xi)= σ2. Further suppose that n is large and we are interested in testing hypotheses about μ. Since n is large the CLT applies to the sample mean and the test statistics is again the standardized version of the sample mean , that is we use the z-test. If the variance of the population is unknown the result of the test is approximately correct. STA286 week 10
22
Example –Binomial Distribution
Suppose X1,…,Xn are random sample from Bernoulli(θ) distribution. We are interested in testing hypotheses about θ… STA286 week 10
23
Test on Pairs of Means – Case I
Suppose are iid independent of that are iid Further, suppose that n1 and n2 are large or that are known. We are interested in testing H0: μx = μy versus a one sided or a two sided alternative… Then,… STA286 week 10
24
Test on Pairs of Means – Case II
Suppose are iid independent of that are iid Further, suppose that are unknown but we assume they are equal to σ2. We are interested in testing H0: μx - μy = δ versus a one sided or a two sided alternative… Then,… STA286 week 10
25
Test on Pairs of Means – Case III
Suppose are iid independent of that are iid Further, suppose that are unknown but we can not assume that they are equal to. We are interested in testing H0: μx - μy = δ versus a one sided or a two sided alternative… Then,… STA286 week 10
26
Example The strength of concrete depends, to some extent, on the method used for drying it. Two drying methods were tested on independently specimens yielding the following results… We can assume that the strength of concrete using each of these methods follows a normal distribution with the same variance. Do the methods appear to produce concrete with different mean strength? Use α = 0.05. STA286 week 10
27
Test for a Single Variance
Suppose X1, …, Xn is a random sample from a N(μ, σ2) distribution. We are interested in testing versus a one sided or a two sided alternative… Then… STA286 week 10
28
Test on Pairs of Variances
Suppose are iid independent of that are iid We are interested in testing versus a one sided or a two sided alternative… Then… STA286 week 10
29
Example STA286 week 10
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.