Data Science Classroom Series – 12/Nov/2021

Confidence Intervals of Independent Samples

  • Population Variance Known:

    • Example: University doing research on Percentages of Management & Engineering Students Preview
    • Refer Here for the xlsx sheet
    • Considerations:
      • The Populations are normally distributed
      • The population variances are known
      • The Sample Sizes are different
    • We want to find 95% confidence interval for the difference between the percentages of marks of the students from engineering & Management
    • Facts about the data
      • Samples are big
      • Population Variances are known
      • So, we will be using Z-Statistic
    • Now Lets use the following formulas
      • Variance of the difference Preview
      • Applying this formula we got the following results Preview
      • CI for the Independent Samples with Known Population variance Preview
    • Results: Preview
    • Take aways:
      • We are 95% Confident that the true mean difference between engineering and management grades will fall under this interval (-9.28, -4.72)
      • The Whole interval is negative => engineers are consistently getting lower percentages
      • If we had calculate difference of management – engineering our CI => (4.72, 9.28)
    • Exercise Calculate 99% CI Preview
  • Population Variance Unknown but assumed to be equal:

    • Lets take an example of Coffee prices in new york and LA and try to calculate the difference of means
    • Refer Here for the dataset
    • Now lets calculate the Mean and Std dev of NY and LA Preview
    • Formula: We need to calculate pooled variance Preview
    • Lets apply the formula Preview
    • Lets calculate Pooled Variance and Std Deviation Preview
    • Considerations
      • Population variance is unknown
      • Sample Size is Small
      • So we would go with T Score
    • CI Formula: Preview
    • degrees of freedom => 10+8-2 => 16
    • We are calculating 95% confidence => t 16, 0.025 => 2.12
    • The value is Preview
    • Inference:
      • Coffee in new york is expensive than LA
      • We are 95% confident that Coffee in NY will be expensive than LA in the interval of (0.47,0.92) dollars
    • Exercise: Try to Calculate for 90% CI

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin