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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!