Data Science Classroom Series – 11/Nov/2021

Confidence Intervals with two populations

  • Samples:
    • Dependent:
      • Scenarios:
        • before and after
        • Cause and Effect
      • Examples:
        • Weight Loss
        • Blood Samples
        • Researching families (couples)
      • Testing Approaches
        • Confidence Intervals for dependent Samples
        • Statistical methods such as regressions
    • Independent
      • Three cases:
        • Population variance Known
        • Population variance Unknown but assumed to be equal
        • Population variance Unknown but assumed to be different
  • Example 1 of Dependent Samples:
    • LT Biotech is company which has created a drug to increase magnesium levels in blood
    • This organization has taken a sample of 10 patients and collected the magnesium levels in blood before and after taking drug
    • This is measured in mg/dL and the normal range is 1.7 to 2.2
    • Refer Here for the xlsx with sample data
    • Lets calculate the Difference (After-Before) Preview
    • Now the data looks like a single population sample
    • We have 10 Samples, We don’t know population variance & we need to calculate the confidence interval => We will be using Student’s T Distribution
    • Lets calculate std deviation and std error and sample mean Preview
    • Confidence inteval for difference of two means, dependent samples formula Preview
    • Lets calculate confidence interval with 95% confidence Preview
    • How do we interpret this result?
      • In 95% of the cases, the true mean will fall in interval (0.004729608, 0.655270392)
      • The whole interval is positive which means drug has a positive effect on increase of magnesium.
      • The Drug is effective.
  • Example 2: LT team has developed a diet plan for loosing weight. It seems to be working but organization wants to know how much weight are you likely to loose. The weight is measure in pounds. Find the 95% confidence level and interpret the results
    • Refer Here for the dataset
    • Results: Preview
    • We are 95% confident that this diet plan will help in loosing weight between 24.78 lbs and 15.058 lbs

Leave a Comment

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

About learningthoughtsadmin