1 / 42

Ch 13 實習

Ch 13 實習. Inference about the Difference between Two Means: Independent Samples. Two random samples are drawn from the two populations of interest. Because we compare two population means, we use the statistic. The Sampling Distribution of.

Télécharger la présentation

Ch 13 實習

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch 13 實習

  2. Inference about the Difference between Two Means: Independent Samples • Two random samples are drawn from the two populations of interest. • Because we compare two population means, we use the statistic .

  3. The Sampling Distribution of • is normally distributed if the (original) population distributions are normal . • is approximately normally distributed if the (original) population is not normal, but the samples’ size is sufficiently large (greater than 30). • The expected value of is m1 - m2 • The variance of is s12/n1 + s22/n2

  4. Making an inference about m1– m2 • If the sampling distribution of is normal or approximately normal we can write: • Z can be used to build a test statistic or a confidence interval for m1 - m2

  5. Making an inference about m1– m2 • Practically, the “Z” statistic is hardly used, because the population variances are not known. t S22 S12 ? ? • Instead, we construct a t statistic using the sample “variances” (S12 and S22).

  6. Making an inference about m1– m2 • Two cases are considered when producing the t-statistic. • The two unknown population variances are equal. • The two unknown population variances are not equal.

  7. Example: s12 = 25; s22 = 30; n1 = 10; n2 = 15. Then, Inference about m1– m2: Equal variances • Calculate the pooled variance estimate by: The pooled variance estimator n2 = 15 n1 = 10

  8. Build a confidence interval or 0 Inference about m1– m2: Equal variances • Construct the t-statistic as follows: • Perform a hypothesis test H0: m1 - m2 = 0 H1: m1 - m2 > 0 or < 0

  9. It is usually necessary to round this number to the nearest integer Inference about m1– m2: Unequal variances

  10. Inference about m1– m2: Unequal variances Conduct a hypothesis test as needed, or, build a confidence interval

  11. Example 1 • Who spends more on their vacations, golfers or skiers? To help answer this question, a travel agency surveyed 15 customers who regularly take their spouses on either a skiing or a golfing vacation. The amounts spent on vacations last year are shown here. Can we infer that golfers and skiers differ in their vacation expenses? (Use α=10%) • Golfers 2450 3860 4528 1944 3166 3275 4490 3685 2950 Skiers 3805 3725 2990 4357 5550 4130

  12. Solution 1

  13. Example 2 • Many people who own digital cameras prefer to have pictures printed. In a preliminary study to determine spending patterns, a random sample of 8 digital camera owners and 8 standard cameras owners were surveyed and asked how many pictures they printed in the past month, The results are presented here. Can we infer that the two groups differ in number of pictures that are printed? (Use α=10%) Digital 15 12 23 31 20 14 12 19 Standard 0 24 36 24 0 48 0 0

  14. Solution 2

  15. Example 3 • Two random samples of 40 students were drawn independently from two normal populations. The following statistics regarding their scores in a final exam were obtained: , s1=8, , and s2=6.5. (Use equal variance) • Estimate with 95% confidence the difference between the two population means. • Explain how to use the 95% confidence interval to test the hypotheses that whether we can infer that the two population means differ at α=5%

  16. Solution 3 • Thus, LCL = 0.757, and UCL = 7.243 • Since the hypothesized value 0 is not included in the 95% confidence level for we reject H0 at α=5%

  17. 13.3 Matched Pairs Experiment • What is a matched pair experiment? • 兩群體的資料(觀察值)是成對出現,亦即 兩組資料是相依的 • Why matched pairs experiments are needed? • 當兩群體資料不獨立 • 再決定要用何種檢定方法前,先判斷兩群體之間 是否存在某種關係 • How do we deal with data produced in this way?

  18. The matched pairs hypothesis test • Solution (by hand) • The parameter tested is mD (=m1–m2) • The hypotheses:H0: mD = 0H1: mD > 0 • The t statistic: Degrees of freedom = nD – 1

  19. The matched pairs mean difference estimation

  20. Example 4 • In a preliminary study to determine whether the installation of a camera designed to catch cars that go through red lights affects the number of violators, the number of red-light runners was recorded for each day of the week before and after the camera was installed. The results are listed here. Can we infer that the camera reduces the number of red-light runners? (Use α=5%) Before 12 16 31 18 20 24 16 After 8 18 24 19 16 19 16

  21. Solution 4

  22. Example 5 • To compare the wearing of two types of automobile tires, 1 and 2, an experimenter chose to "pair" the measurements, comparing the wear for the two types of tires on each of 7 automobiles, as shown below. • (a)Determine whether these data are sufficient to infer at the 10% significance level that the two types of tires wear differently • (b)Estimate with 90% confidence the mean difference and interpret.

  23. Solution 5 • (a) , (Tire 1 - Tire 2) • Rejection region: | t | > t0.05,6 = 1.943 • Test Statistics: t = -1.225 • Conclusion: Don't reject the null hypothesis. No, these data are not sufficient to infer at the 10% significance level that the two types of tires wear differently. • (b) -1.0 ± 1.587. Thus, LCL = -2.587, and UCL = 0.587. •  We estimate that the mean difference in wear between the two brands of tires is between -2.587 and 0.587. Since the hypothesized value 0 is included in the 90% interval estimate, we fail to reject the null hypothesis at a = 0.10.

  24. Inference about the ratio of two variances • In this section we draw inference about the ratio of two population variances. • This question is interesting because: • Variances can be used to evaluate the consistency of processes. • The relationship between population variances determines which of the equal-variances or unequal-variances t-test and estimator of the difference between means should be applied

  25. Parameter and Statistic • Parameter to be tested is s12/s22 • Statistic used is • Sampling distribution of s12/s22 • The statistic [s12/s12] / [s22/s22] follows the F distribution with n1 = n1 – 1, and n2 = n2 – 1.

  26. F distribution • F有兩個自由度(v1,v2) • F之倒數1/F亦為F分佈:分子與分母自由度互換

  27. F distribution • (n-1)s2/σ2~χ2

  28. Under this null hypothesis the F statistic becomes S12/s12 F = S22/s22 Parameter and Statistic • Our null hypothesis is always H0: s12 / s22 = 1

  29. Estimating the Ratio of Two Population Variances • From the statistic F = [s12/s12] / [s22/s22] we can isolate s12/s22 and build the following confidence interval: 1

  30. Estimating the Ratio of Two Population Variances

  31. Example 6 • The manager of a dairy is in the process of deciding which of two new carton-filling machine to use. The most important attribute is the consistency of the fills. In a preliminary study, she measured the fills in the l-liter carton and listed them here. Can the manager infer that the two machine differ in their consistency of fills? (Use α=5%) • Machine 1 0.998 0.997 1.003 1.000 0.999 1.000 0.998 1.003 1.004 1.000 Machine 2 1.003 1.004 0.997 0.996 0.999 1.003 1.000 1.005 1.002 1.004 0.996

  32. Solution 6

  33. Inference about the difference between two population proportions • In this section we deal with two populations whose data are nominal. • For nominal data we compare the population proportions of the occurrence of a certain event. • Examples • Comparing the effectiveness of new drug versus older one • Comparing market share before and after advertising campaign • Comparing defective rates between two machines

  34. Parameter and Statistic • Parameter • When the data are nominal, we can only count the occurrences of a certain event in the two populations, and calculate proportions. • The parameter is therefore p1– p2. • Statistic • An unbiased estimator of p1– p2 is (the difference between the sample proportions).

  35. x ˆ = p 1 1 n 1 Sampling Distribution of • Two random samples are drawn from two populations. • The number of successes in each sample is recorded. • The sample proportions are computed. Sample 2 Sample size n2 Number of successes x2 Sample proportion Sample 1 Sample size n1 Number of successes x1 Sample proportion

  36. Sampling distribution of • The statistic is approximately normally distributedif n1p1,n1(1 - p1), n2p2, n2(1 - p2) are all greater than or equal to 5. • The mean of is p1 - p2. • The variance of is (p1(1-p1)/n1)+ (p2(1-p2)/n2)

  37. The z-statistic Because and are unknown the standard error must be estimated using the sample proportions. The method depends on the null hypothesis

  38. Testing the p1– p2 • There are two cases to consider: Case 1: H0: p1-p2 =0 Calculate the pooled proportion Case 2: H0: p1-p2 =D (D is not equal to 0) Do not pool the data Then Then

  39. Confidence interval

  40. Example 7 • Survey have been widely used by politicians around the world as a way of monitoring the opinions of the electorate. Six months ago, a survey was undertaken to determine the degree of support for a national party leader. Of a sample of 900, 54% indicated that they would vote for this politician. This month, another survey of 600 voters revealed that 43% now support the leader. • a. At the 5% significance level, can we infer that the national leader’s popularity has decreased? • b. At the 5% significance level, can we infer that the national leader’s popularity has decreased by more than 5%? • c. Estimate with 95% confidence the decrease in percentage support between now and 6 months ago.

  41. Solution 7

  42. Summary Data type Interval Nominal 兩母體比例數差異檢定 兩母體平均數差異檢定 獨立? Yes No 虛無假設:2母體比例相等 虛無假設:2母體比例不相等 獨立樣本t檢定 相依樣本t檢定 兩母體變異數有相等嗎? • 兩母體變異數檢定 • 條件:兩母體為常態分配,或者樣本至少要有30筆 • 考法:(a)假設檢定 (b)信賴區間 Yes No 使用Pool variance 使用見鬼的自由度公式

More Related