Question
1) Generate a sample of size 10 from a normal distribution with mean mu1 = 5 and standard deviation sigma = 2. Also generate a
1) Generate a sample of size 10 from a normal distribution with mean mu1 = 5 and standard deviation sigma = 2. Also generate a sample of size 12 from a normal distribution with mean mu2 = 3 and standard deviation sigma = 2. Create a 95 % two-sided confidence interval for the difference in means mu1 - mu2 based on these two samples. Does mu1 - mu2 belong to the confidence interval?
2) Repeat the above experiment 1000 times (using a for loop). In what fraction of the trials do you observe that mu1 - mu2 belongs to the confidence interval?
To be submitted: A .py file containing your Python code. When I run your code, it should perform the above experiments and print out the answers to the questions above (in red text)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started