ibution between 0 and 23 seconds. L.e. any smiling time from 0 23 seconds For this problem, we will explore the distribution of the sample mean. Suppose yo to collect a random sample of size n (i.e. each person will need to observe n ind times). Let X; be the length, in seconds, of the ith eight-week old baby's smile. (a) Theoretically, what are E(X) and Var(X)? Your answers can depend on th Note that if X is uniformly distributed over (a, b), then the expectation and a+b and Var(X) = E(X) as you showed in the previous problem. (1) Fi M-A (b-a)² 12

A First Course in Probability (10th Edition)
10th Edition
ISBN:9780134753119
Author:Sheldon Ross
Publisher:Sheldon Ross
Chapter1: Combinatorial Analysis
Section: Chapter Questions
Problem 1.1P: a. How many different 7-place license plates are possible if the first 2 places are for letters and...
icon
Related questions
Question
Several studies have shown that the smiling times for an eight-week old baby follow a uniform
distribution between 0 and 23 seconds. i.e. any smiling time from 0 to 23 seconds is equally likely.
For this problem, we will explore the distribution of the sample mean. Suppose you ask 500 people
to collect a random sample of size n (i.e. each person will need to observe n independent smiling
times). Let X; be the length, in seconds, of the th eight-week old baby's smile.
(a) Theoretically, what are E(X) and Var(X)? Your answers can depend on the sample size n.
Note that if X is uniformly distributed over (a, b), then the expectation and variance of X are
Var(X) =
E(X)=
a+b
2
as you showed in the previous problem.
and
(b-a)²
12'
(b) The Matlab command that you can use to generate the uniform(a, b) random variables of size
n is unifrnd (a,b,n). For the kth person, where k € {1,2,..., 500}, use Matlab to generate
a random sample of size n = 10, compute the sample mean and save it to the vector xbar1.
You will end up with 500 sample means stored in the vector xbar1. What are the mean and
variance of the sample mean from the simulation? Verify that they are very close to theoretical
values from part (a). Turn in your Rcode as well.
(c) Repeat tasks posed in part (b) for a sample size of n = 100. Please save your 500 sample means
to the vector xbar2.
(d) Repeat tasks posed in part (b) for a sample size of n = 200. Please save your 500 sample means
to the vector xbar3.
(e) Use the following Matlab code to plot side-by-side histograms from parts (b) to (d):
subplot (1,3,1)
hist (xbar1)
subplot (1,3,2)
hist (xbar2)
subplot (1,3,3)
hist (xbar3)
Attach your plot to the homework. What do you notice on the variance of X when n increases?
Transcribed Image Text:Several studies have shown that the smiling times for an eight-week old baby follow a uniform distribution between 0 and 23 seconds. i.e. any smiling time from 0 to 23 seconds is equally likely. For this problem, we will explore the distribution of the sample mean. Suppose you ask 500 people to collect a random sample of size n (i.e. each person will need to observe n independent smiling times). Let X; be the length, in seconds, of the th eight-week old baby's smile. (a) Theoretically, what are E(X) and Var(X)? Your answers can depend on the sample size n. Note that if X is uniformly distributed over (a, b), then the expectation and variance of X are Var(X) = E(X)= a+b 2 as you showed in the previous problem. and (b-a)² 12' (b) The Matlab command that you can use to generate the uniform(a, b) random variables of size n is unifrnd (a,b,n). For the kth person, where k € {1,2,..., 500}, use Matlab to generate a random sample of size n = 10, compute the sample mean and save it to the vector xbar1. You will end up with 500 sample means stored in the vector xbar1. What are the mean and variance of the sample mean from the simulation? Verify that they are very close to theoretical values from part (a). Turn in your Rcode as well. (c) Repeat tasks posed in part (b) for a sample size of n = 100. Please save your 500 sample means to the vector xbar2. (d) Repeat tasks posed in part (b) for a sample size of n = 200. Please save your 500 sample means to the vector xbar3. (e) Use the following Matlab code to plot side-by-side histograms from parts (b) to (d): subplot (1,3,1) hist (xbar1) subplot (1,3,2) hist (xbar2) subplot (1,3,3) hist (xbar3) Attach your plot to the homework. What do you notice on the variance of X when n increases?
Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Similar questions
Recommended textbooks for you
A First Course in Probability (10th Edition)
A First Course in Probability (10th Edition)
Probability
ISBN:
9780134753119
Author:
Sheldon Ross
Publisher:
PEARSON
A First Course in Probability
A First Course in Probability
Probability
ISBN:
9780321794772
Author:
Sheldon Ross
Publisher:
PEARSON