Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Plot the probability density function for z-statistic and t-statistic of 4 s

ID: 3790744 • Letter: #

Question

(a) Plot the probability density function for z-statistic and t-statistic of 4 sample size in the same figure for z or t in the range of [-4 4]. Use a vertical line to label the upper bound of the 95% confidence interval for z and t-statistic, and comment on the difference between two. (Use MATLAB.)

(b) For the degree of freedom = 3, find the lower and the upper bounds of 95% confidence interval for 2 respectively, using the TABLE and MATLAB. Explicitly show how you arrived at these values.

(c) For the degree of freedom = 3, plot 2 in the range of [0 14]. Use a vertical line to label the lower and the upper bounds of 95% confidence interval. (Use MATLAB.)

Explanation / Answer

a.)

x = -4:0.01:4;

z = pdf('normal',x) %for Z statistics

t=tpdf(nu,x) %for T statitics

fitresult = fit(cdate,pop,'poly2') %parameters must be entered from fit() function

ci = confint(fitresult,0.95) %for genearating confidence interval

plot(z,y) %plotting Z statistics

plot(t,y) %plotting t statistics

difference = tpdf(-4:4,30)-normpdf(-4:4) % difference between two statitics