Virtual COMSATS Inferential Statistics MTH 264 Lecture12 Ossam

  • Slides: 25
Download presentation
Virtual COMSATS Inferential Statistics MTH 264 Lecture-12 Ossam Chohan Assistant Professor CIIT Abbottabad 1

Virtual COMSATS Inferential Statistics MTH 264 Lecture-12 Ossam Chohan Assistant Professor CIIT Abbottabad 1

Recap of previous lecture • • • Introduction to Statistical Inference Approaches to draw

Recap of previous lecture • • • Introduction to Statistical Inference Approaches to draw inferences Estimation Hypothesis Testing Types of Estimation Point Estimation – Degree of Confidence – Margin of Error • Interval Estimation • Confidence Interval Estimation 2

Objective of this lecture After completing this lecture, you should be able to: •

Objective of this lecture After completing this lecture, you should be able to: • Interval Estimate for – Two independent population means. • Standard deviations known • Standard deviations unknown, but sample sizes>30 • Standard deviations unknown but ni<30 – Two means from paired samples. – The difference between two population proportions.

Estimation for Two Populations Estimating two population values Population means, independent samples Paired samples

Estimation for Two Populations Estimating two population values Population means, independent samples Paired samples Population proportions Examples: Group 1 vs. independent Group 2 Same group before vs. after treatment Proportion 1 vs. Proportion 2

Difference Between Two Means Population means, independent samples σ1 and σ2 known σ1 and

Difference Between Two Means Population means, independent samples σ1 and σ2 known σ1 and σ2 unknown, n 1 and n 2 30 σ1 and σ2 unknown, n 1 or n 2 < 30 Goal: Form a confidence interval for the difference between two population means, μ 1 – μ 2 The point estimate for the difference is x 1 – x 2

Independent Samples • Different data sources – Unrelated – Independent • Sample selected from

Independent Samples • Different data sources – Unrelated – Independent • Sample selected from one population has no effect on the sample selected from the other population • Use the difference between 2 sample means. • Use z test or pooled variance t test.

σ1 and σ2 known Assumptions: § Samples are randomly and independently drawn § population

σ1 and σ2 known Assumptions: § Samples are randomly and independently drawn § population distributions are normal or both sample sizes are 30 § Population standard deviations are known Selection of Test Statistics depends upon the conditions. Conditions are almost same as we did in single sample case. Few variations are possible

Standard error • When σ1 and σ2 are known and both populations are normal

Standard error • When σ1 and σ2 are known and both populations are normal or both sample sizes are at least 30, with the test statistic z and standard error is: 8

Confidence interval • Confidence interval for difference between means µ 1 -µ 2 is

Confidence interval • Confidence interval for difference between means µ 1 -µ 2 is No degrees of freedom attached here. Why? Justify your answer. 9

Problem-21 • Two independent samples of 100 mechanists and 100 carpenters are taken to

Problem-21 • Two independent samples of 100 mechanists and 100 carpenters are taken to estimate the difference between the weekly wages of the two categories of workers. The relevant data are given below: Sample mean wage Pop. Variance Mechanists 345 196 Carpenters 340 204 • Determine the 95% and 99%confidence limits for the true difference the average wages for mechanists and carpenters. 10

Problem-21 Solution 11

Problem-21 Solution 11

Assessment Problem-1 • A manufacturing company consists of two departments producing identical products. It

Assessment Problem-1 • A manufacturing company consists of two departments producing identical products. It is suspected that the hourly outputs in the two departments are different. Two random samples of production hours are respectively selected, and the following data are obtained: Department-1 Department-2 Sample Size 64 49 Sample Mean 100 90 12

Assessment problem-1 Cont. . • The variances of the hourly outputs for the two

Assessment problem-1 Cont. . • The variances of the hourly outputs for the two departments are known to be δ 12= 256 and δ 22=196 respectively. – What is the point estimate for the true difference between the means outputs of the two departments? – Find the 95% confidence limits for the true differences. – Interpret the results. 13

Problem-22 • Suppose that simple random samples of college freshman are selected from two

Problem-22 • Suppose that simple random samples of college freshman are selected from two universities - 15 students from school A and 20 students from school B. On a standardized test, the sample from school A has an average score of 1000 with a standard deviation of 100. The sample from school B has an average score of 950 with a standard deviation of 90. • What is the 90% confidence interval for the difference in test scores at the two schools, assuming that test scores came from normal distributions in both schools. 14

Problem-22 Solution • How this problem is different than problem-21. • Different mean in

Problem-22 Solution • How this problem is different than problem-21. • Different mean in nature only. 15

Problem-22 Solution 16

Problem-22 Solution 16

Normal Populations with unknown standard deviations • Assumptions: – Independent and random samples. –

Normal Populations with unknown standard deviations • Assumptions: – Independent and random samples. – Both n 1 and n 2 are greater than 30. – Unknown population standard deviation. • Use sample standard deviation to estimate population standard deviations. • Appropriate test statistic would be z. 17

Variation unknown but ni > 30 • Test Statistics to be used in this

Variation unknown but ni > 30 • Test Statistics to be used in this case is: 18

Problem-23 • Two independent samples of observations were collected. For the first sample of

Problem-23 • Two independent samples of observations were collected. For the first sample of 60 elements, the mean was 86 and the standard deviation 6. the second sample of 75 elements had a mean of 82 and a standard deviation of 9. – Compute the estimated standard error of the difference between the two means. – Also find the 95% confidence interval for difference between means. 19

Problem-23 Solution 20

Problem-23 Solution 20

Assessment problme-2 • A sample of 150 brand A light bulbs showed a mean

Assessment problme-2 • A sample of 150 brand A light bulbs showed a mean life time of 1400 hours (h) and a standard deviation of 120 h. A sample of 200 brand B light bulbs showed a mean lifetime of 1200 h and a standard deviation of 80 h. – Find 90% and 94% confidence limits for the difference of the mean lifetime of the populations of brands A and B 21

Population variances are unknown but can be assumed to be equal (t is used)

Population variances are unknown but can be assumed to be equal (t is used) • If it can be assumed that the population variances are equal then each sample variance is actually a point estimate of the same quantity. Therefore, we can combine the sample variances to form a pooled estimate. • Weighted averages The pooled estimated of the common variance is made using weighted averages. This means that each sample variance is weighted by its degrees of freedom. 22

Assumptions • Populations are normally distributed. • Populations have equal variances but still unknown.

Assumptions • Populations are normally distributed. • Populations have equal variances but still unknown. • Independence of samples must be ensured. • If population variances are equal then pooled value can be calculated. • Degree of freedom would be (n 1+n 2 -2). • Appropriate test is ‘t’ 23

 • Pooled estimate of the variance The pooled estimate of the variance comes

• Pooled estimate of the variance The pooled estimate of the variance comes from the formula: Standard error of the estimate The standard error of the estimate is 24

Confidence interval The 100(1 -α )% confidence interval for µ 1 -µ 2 is:

Confidence interval The 100(1 -α )% confidence interval for µ 1 -µ 2 is: 25