HW 5
docx
keyboard_arrow_up
School
Temple University *
*We aren’t endorsed by this school
Course
2521
Subject
Statistics
Date
Jan 9, 2024
Type
docx
Pages
4
Uploaded by DeanStar27858
HW 5
Sam Saporito
1.
Toss a fair coin 10 times. Find the probability of getting exactly 5 heads
a) using the formula of Binomial pmf;
choose(10,5)*.5^5*(1-.5)^(10-5);
[1] 0.2460938
b) using Binomial density function dbinom;
> dbinom(5,10,.5)
[1] 0.2460938
c) using Binomial cumulative probability function pbinom;
pbinom(5,10,.5) – pbinom(4,10,.5)
[1] 0.2460938
d) using normal approximation. (Hint: first follow page 20 of the slides
and check
whether normal approximation is appropriate)
Normal distributiuon is appropriate because the graph is symmetrical.
2.
a) Generate a random sample with 10 observations from the normal population with
mean 5 and variance 25 (NOT standard deviation). Report the sample mean and the
sample variance for this sample.
# stdv is square root var
>n=10
>x=rnorm(n,5,5)
>mean(x)
[1] 3.119021
>var (x)
[1] 21.65118
b) Repeat a) 500 times and get 500 sample means. Report the sample mean of these
means. What about the sample variance of these sample means.
#Continued from above
>Mean(rnorm(n,5,5))
[1] 7.371327
M=500
X_bar_all=replicate(m,mean(rnorm(n,5,5)))
Mean(x_bar_all)
[1] 4.915064
>var(x_bar_all)
[1] 2.914185
c) What is the population variance of the sample mean in part b)? What if each sample
has 20 observations? (Hint: the formula on page 34 of the slides is about the standard
deviation of the sample mean. You have to square it to get the formula for the variance
of the sample mean)
standard deviation of sample population/square root of sample size=stdev of sample mean
>stdv=sd(x_bar_all)
[1] 1.707098
Stdv^2=2.914185
Sqrt sample size=sqrt(10)=3.1623
Stdv of sample means=(2.91285/3.1623)=0.9215462
Population variance of the sample mean= (stdv of sample mean)^2
=(.9215461)^2=.8492474
If each Sample mean had 20 oberservations then
Sqrt sample size=sqrt(20)=4.4721
Stdv of sample means=(2.91285/4.4721)=0.651631
(0.651631)^2=0.4246237= population variance of the sample mean
3. State Central Limit Theorem.
When n is large, the sampling distribution od x is approximately a normal distribution with
u
x =
u
and
standard deviation = stdv/ square root sample size. The larger the sample size is, the better the
normal approximation will be to the sample distribution.
4.
Please refer to Problem 3 above. We can generate a random sample with n observa-
tions from the chi-squared distribution with k degrees of freedom via rchisq(n,k)
a)
Generate m = 1000 samples from chi-squared distribution with k = 3 degrees of
freedom, with each sample having n = 2 observations. Draw a histogram of these 1000
sample means. Does the histogram look symmetric?
>rchisq(2,3)
[1] 3.77 0.807
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
>mean(rchisq(2,3))
[1] 4.905
>n=2
M=1000
>x_bar_all=rep(0,m)
>for(I in 1:m){}
>x=rchisq(n,3)
X_bar=mean(x)
X_bar_all[i]=x_bar
Hist(x_bar_all
The histogram does not look symmetric.
b) Repeat the procedure in a) with n = 100 and m = 1000. Draw the histogram of the
sample means. Do you see any differences between the two histograms? Explain why.
The graph does change, when changing the value of m, the graph becomes steeper.
Related Questions
Please answer all part :
Let rt be a log return. Suppose that r0, r1, . . . are i.i.d. N(0, 0.01^2).
(a) What is the distribution of rt(8) = rt + rt−1 + rt−2 +...+ rt−7?
(b) What is the covariance between r7(3) and r9(3)?
(c) What is the conditional distribution r17(3) given that r16 =0.004
(d) What is the probability that the gross return over the first 10 times periods is at least 1.05?
arrow_forward
Pb(Z = z) = B (8.25z - z2)
with z E {1, 2, ......., 5}.
What value must B be to ensure the probability mass function for Z, equation(1), is valid?
I asked this question before but the experts writting was difficult to read. Can you please answer with clear writting. Thanks.
arrow_forward
D6)
Finance
Suppose that the stock price follows geometric Brownian motion dXt = 0.04 Xt dt + 0.2 Xt dWt. Write the probability density function for the distribution of the stock prices in 2 years if the current stock price is 80.
arrow_forward
EXER 6.3
Find the covariance and the correlation coefficient between X
and Y, if X and Y are jointly discrete random variables, with
joint PMF given by: SHOW SOLUTIONS
X\Y
0
1
6
0
28
6
1
28
2
0
333333
28
28
28
2120
28
0
arrow_forward
Q.3 The probability density function for a continuous
random variable X is
fx(x) = }"
(a+ bx2; 0 < x< 1,
0;
%3D
e.w.
(i) Find constants a and b if E (X) = 0.6
(ii) Find cumulative distribution function (cdf), moment
generating function.
(iii) Using mgf, find ß, and ß2 and comment on it.
(iv) Sketch pdf and cdf.
%3D
arrow_forward
EX7.8) Let Y be a random variable having a uniform normal distribution
such that
Y U(2,5)
2
Find the variance of random variable Y.
arrow_forward
The thickness X of a wooden shim (in mm) has probability density function
3(x - 5)
4
3
4
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc

Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning

Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning

Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON

The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman
Related Questions
- Please answer all part : Let rt be a log return. Suppose that r0, r1, . . . are i.i.d. N(0, 0.01^2). (a) What is the distribution of rt(8) = rt + rt−1 + rt−2 +...+ rt−7? (b) What is the covariance between r7(3) and r9(3)? (c) What is the conditional distribution r17(3) given that r16 =0.004 (d) What is the probability that the gross return over the first 10 times periods is at least 1.05?arrow_forwardPb(Z = z) = B (8.25z - z2) with z E {1, 2, ......., 5}. What value must B be to ensure the probability mass function for Z, equation(1), is valid? I asked this question before but the experts writting was difficult to read. Can you please answer with clear writting. Thanks.arrow_forwardD6) Finance Suppose that the stock price follows geometric Brownian motion dXt = 0.04 Xt dt + 0.2 Xt dWt. Write the probability density function for the distribution of the stock prices in 2 years if the current stock price is 80.arrow_forward
- EXER 6.3 Find the covariance and the correlation coefficient between X and Y, if X and Y are jointly discrete random variables, with joint PMF given by: SHOW SOLUTIONS X\Y 0 1 6 0 28 6 1 28 2 0 333333 28 28 28 2120 28 0arrow_forwardQ.3 The probability density function for a continuous random variable X is fx(x) = }" (a+ bx2; 0 < x< 1, 0; %3D e.w. (i) Find constants a and b if E (X) = 0.6 (ii) Find cumulative distribution function (cdf), moment generating function. (iii) Using mgf, find ß, and ß2 and comment on it. (iv) Sketch pdf and cdf. %3Darrow_forwardEX7.8) Let Y be a random variable having a uniform normal distribution such that Y U(2,5) 2 Find the variance of random variable Y.arrow_forward
Recommended textbooks for you
- MATLAB: An Introduction with ApplicationsStatisticsISBN:9781119256830Author:Amos GilatPublisher:John Wiley & Sons IncProbability and Statistics for Engineering and th...StatisticsISBN:9781305251809Author:Jay L. DevorePublisher:Cengage LearningStatistics for The Behavioral Sciences (MindTap C...StatisticsISBN:9781305504912Author:Frederick J Gravetter, Larry B. WallnauPublisher:Cengage Learning
- Elementary Statistics: Picturing the World (7th E...StatisticsISBN:9780134683416Author:Ron Larson, Betsy FarberPublisher:PEARSONThe Basic Practice of StatisticsStatisticsISBN:9781319042578Author:David S. Moore, William I. Notz, Michael A. FlignerPublisher:W. H. FreemanIntroduction to the Practice of StatisticsStatisticsISBN:9781319013387Author:David S. Moore, George P. McCabe, Bruce A. CraigPublisher:W. H. Freeman

MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc

Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning

Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning

Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON

The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman