Upload
vanxuyen
View
215
Download
2
Embed Size (px)
Citation preview
Tentative schedule
June, 22nd , Monday (lecture)
June, 24th, Wednesday (class examples, problem set 3 due)
June, 25th, Thursday(lecture, hand out take-home Quiz 4)
June, 29th , Monday (Quiz 4 due, problem set 4 due, explain questions on Quiz 4, hand out sample final exam)
July, 1st, Wednesday (explain sample final exam)
July, 2nd, Thursday (2-hour Final exam)
Recall: In last chapter, we learned statistical inference for population proportion p.
Problem. Point estimation. (sample proportion ) Distribution of Confidence Interval Hypothesis Testing
Make a decision between two opinions about population proportion p. Step 1: Set up appropriate hypotheses Step 2: Specify the test statistic and the model Step 3: Compute the p-value Step 4: Make a decision
.
p̂p̂
Ch23 Statistical inference for the population mean • In this part, we are going to learn
How to use the sample mean to estimate the population mean?
• Like the estimate for population proportion, we are
going to learn three techniques to estimate the population mean
Average age of Michigan
residents estimate
Average age of the entire U.S. population
Point Estimate
Confidence Interval
Hypotheses Testing
Population mean
• Notations:
Population Notation
Meaning
The population mean
The sample mean
The population standard deviation
s The sample standard deviation
n The sample size
• Let’s try an example together Based on weighting the most animals in the population,
the American Angus Association reported that mature Angus cows had a mean weight of 1309 pounds with a standard deviation of 157 pounds. Meanwhile, a researcher was doing a separate study about the weight. He randomly measured 100 mature Angus cows and got a mean weight of 1242 pounds and a standard deviation of 215 pounds.
Question: Please identify the values for Solution: Population mean Sample mean Population SD Sample SD Sample size
Term 1: Point estimate • To estimate the population mean , a very natural
choice of the point estimate is the sample mean
Example: To estimate the average height of the MSU students
(population) , we can use the average height of the students in our class (sample)
Remark: is not the only point estimate of , but in some
sense, of a random sample is a reliable point estimate of
A single point estimate
Term 1: Point estimate
Term 2: Sampling distribution of
• Before we construct the confidence interval for , we need to study the sampling distribution of
The center limit theorem says, When a random sample is drawn from any
population with mean and standard deviation ,
given the sampled values are independent and the sample size is large enough.
• Therefore,
Before we apply the CLT, we should always check the following two assumptions are satisfied or not: 1)Sample values are independent with each other 2)Sample size is large enough Example : Based on weighting the most animals in the population, the American Angus Association reported that mature Angus cows had a mean weight of 1309 pounds with a standard deviation of 157 pounds. A researcher was did a separate study about the weights of 100 randomly selected mature Angus. Question: Suppose the assumptions are met, what is the distribution of the average weight of the sampled Angus cows?
Term 2: Sampling distribution of
Derived from CLT, we will get One-sample z-interval A C% level one-sample z-interval for is It satisfies:
The critical value: Interpretation of one-sample z-interval:
1) We are C% confident that our interval will capture the true population mean
2) Among 100 C% C.I. generated from different samples, we expect C of them will capture the true population mean
2100),1,0%,(* +
==CBBinvnormz
• Let’s try an example together The American Angus Association reported that weights
of mature Angus cows have a standard deviation of 157 pounds. Meanwhile, a researcher did a separate study about the weight. He randomly measured 100 mature Angus cows and got a mean weight of 1242 pounds.
Question: Please give a 95% one-sample z-interval for the population mean weight and interpret it.
Solution: One-sample Zint: Interpretation: We are 95% confident that the average
weight of all mature Angus is between 1211.228 and 1272.772 pounds.
• Comments on 1-sample z-interval 1) is the center of one-sample z-interval 2) Width of the C.I.= (NarrowPrecise) 3) The margin of error: If confidence level increases, ME will increase; If the sample size n increases, ME will decrease; To obtain a 1-sample Zint with a margin of error
within c, we need at lease sample ,i.e.
Width of C.I.
ME ME
• Let’s try an example together The American Angus Association reported that the
weights of mature Angus cows had a standard deviation of 157 pounds. Meanwhile, a researcher did separate study about the weight. He randomly measured 100 mature Angus cows and got a mean weight of 1242 pounds.
Question: If the researcher wanted to control his 95% one-sample z-interval to be within 15 pounds, at least how many Angus cows should he sample?
Solution: c=15, z*=1.96, =157 (round it up to 421) • So he needs to at least
sample 421 Angus cows.
Based on CLT, we can also derive the 1-sample z-test The complete process of a 1-sample z-test consists of Step1 : Set up appropriate hypotheses
Comments: 1) is the hypothesized value for the population mean 2)H0 holds the “Generally accepted” or “old-fashioned” value 3)HA holds the “Question we concern about”
Null Hypothesis H0 vs. Alternative Hypothesis HA
H0 : vs.
HA : (two-sided)
HA : (one-sided)
HA : (one-sided)
The complete process of a 1-sample z-test consists of Step2: Compute the test statistic, denoted by z Comment: If H0 is true, Step3 : Compute the p-value P-value is the probability that the observed sample value (or more
extreme value) could happen if H0 is true.
Alternative Hypothesis HA P-value formula
HA : (two-sided) P-value=2P(Z>|z|)
HA : (one-sided) P-value=P(Z>z)
HA : (one-sided) P-value=P(Z<z)
The complete process of a 1-sample z-test is Step4: Make a decision with a given -level If p-value< -level, we reject H0 at this level. And we say the
test result is statistically significant at this level.
If p-value≥ -level, we fail to reject H0 at this level. And we say the test result is not statistically significant at this level.
Discussion: Making Errors Comments: P(Type I error)= -level
H0 is true H0 is false
Reject H0 Type I Error
OK
Fail to reject H0
OK Type II Error
The Truth
My Decision
Let’s try an example together. The American Angus Association reported that the
weights of mature Angus cows had a mean of 1309 pounds. Meanwhile, a researcher did a separate study about the weight. He randomly measured 100 mature Angus cows and got a mean weight of 1242 pounds. Suppose the standard deviation of the weights of all mature Angus cows is 157 pounds.
Question: 1) The researcher suspected that the true mean weight
is less than the reported value. Please conduct a one-sample z-test with -level=0.05
Solution: Step1: Hypotheses H0: vs HA: Step2: Compute the Test Statistic Step 3: Compute the P-value Since HA: , P-value=P(Z<-4.2675)=normalcdf(-1e99,-4.2675,0,1) =9.8899×10-6 Step 4: Make a conclusion with -level=0.05 Since P-value< -level, we reject H0 at this level. It confirms the researcher’s suspect is statistically significant.
Continue with the example. Question: 2) Based on your conclusion on this test, which type of
error is possible for you to make? Type I or Type II? And what is the probability of making a Type I error?
Solution: Since our conclusion is to reject H0, it’s possible for us
to make a Type I error. P(Type I error)= alpha level=0.05
H0 is true H0 is false
Reject H0 Type I Error
OK
Fail to reject H0
OK Type II Error
TI commands for Z-interval and Z-Test For 1-sample Zinterval, use 7: Zinterval under STATTESTS Use Inpt: Stats For 1-sample Z-Test, use 1: Z-Test under STATTESTS Use Inpt: Stats Remark: The formula and all the components in Z-interval and
Z-Test are still required to know for the test purpose.
Term 5: T-interval and T-Test for As a population parameter, the population standard deviation, , is usually unknown. Without , there is no way to perform the Z-test or construct the Z-interval However, it’s easy to obtain the sample standard deviation, s. When we only know the value of s rather than , we can use T-interval and T-test when The sampled values are independent The sample comes from a Normally distributed
population
TI commands (under STATTESTS): T-interval: use 8: T Interval
T-Test: use 2:T-Test
Term 5: T-Interval and T-Test for (By using Table)
T-Interval
Term 5: T-Interval and T-Test for (By using Table)
Solution: |t|=3.35, degrees of freedom=n-1=32. From the table, p-value<0.005.(One-tail probability)
Solution: |t|=2.66, degrees of freedom=n-1=19. From the table, 0.01<p-value<0.02. (Two-tail probability)
Let’s try the following example together A nutrition laboratory tests 40 “reduced sodium” hot dogs, finding that the mean sodium content is 310 mg, with a standard deviation of 36 mg. Suppose the weights of this kind hot dogs follow a normal distribution. Question: 1) Please construct a 95% confidence interval for the mean sodium content of this brand of hot dog and interpret it.
Term 5: T-interval and T-Test for
Solution: Since 1)we only know s, the sample standard deviation of 40 hot dogs in this problem, 2)The 40 sampled hot dogs are independent 3)The weights of this kind of hot dogs are normally distributed, it’s the time to use T-interval in this case. TI: STATTESTS Choose 8:Tinterval Inpt: Stats Calculate, then you will get the 95% T-interval as
[298.49mg, 321.51mg]
Term 5: T-interval and T-Test for
36=xS
Example (Continue) A nutrition laboratory tests 40 “reduced sodium” hot
dogs, finding that the mean sodium content is 310 mg, with a standard deviation of 36 mg. Suppose the weights of this kind hot dogs follow a normal distribution.
Question: 2) The researchers in this lab suspect that the true mean sodium content of this kind of hot dogs is higher than the labeled value 300 mg on its nutrition menu. Please perform a hypotheses testing with alpha level=0.05
Term 5: T-interval and T-Test for
Solution: Since 1)we only know s, the sample standard deviation of 40 hot dogs in this problem, 2)The 40 sampled hot dogs are independent 3)The weights of this kind of hot dogs are normally distributed, it’s the time to use T-Test in this case. H0 : vs HA: TI: STATTESTS Choose 2:T-Test Inpt: Stats Calculate, then you can get P-value=0.0434 Since P-value<alpha level, we reject H0 at level 0.05
Term 5: T-interval and T-Test for
Let’s try another example together. Students investigating the packaging of potato chips
purchased 6 bags of Lay’s Ruffles marked with a net weight of 28.3 grams. They carefully weighted the contents of each bag, recording the following weights ( in grams) : 29.3, 28.2, 29.1, 28.7, 28.9, 28.5. Suppose the population of weights follows a Normal dist’n.
Question: 1) Please create a 90% confidence interval for the mean weight of such bags of chips.
Term 5: T-interval and T-Test for
Solution: Since 1)Even though s is not directly given, it’s easy to compute from the data set provided 2)The 6 bags of chips are independent 3)The weights of bags of chip are normally distributed, it’s the time to use T-interval in this case. TI: STATEdit Choose 1:Edit Input the 6 data into L1 Then STATTESTS Choose 8:Tinterval Inpt: Data List: L1 Freq: 1 C-level=0.90 Calculate, then you will get the 90% T-interval as
[28.453 grams, 29.114 grams]
Term 5: T-interval and T-Test for
Let’s try another example together Students investigating the packaging of potato chips
purchased 6 bags of Lay’s Ruffles marked with a net weight of 28.3 grams. They carefully weighted the contents of each bag, recording the following weights ( in grams) : 29.3, 28.2, 29.1, 28.7, 28.9, 28.5. Suppose the population of weights follows a Normal dist’n.
Question: 2) Students want to see whether the marked net mean weight 28.3 grams is accurate or not.
Please conduct a test with alpha level=0.10
Term 5: T-interval and T-Test for
Solution: Since 1)Even though s is not directly given, it’s easy to compute from the data set provided 2)The 6 bags of chips are independent 3)The weights of bags of chip are normally distributed, it’s the time to use T-Test in this case. TI: STATEdit Choose 1:Edit Input the 6 data into L1 Then STATTESTS Choose 2:T-Test Inpt: Data List: L1 Freq: 1 Calculate, then you will get P-value=0.0320 Since P-value<alpha level, we reject H0 at level 0.10
Term 5: T-interval and T-Test for
Term 5: T-interval and T-Test for