1 Homewor 1 AERE 573 Fall 018 DUE 8/9 (W) Name ***NOTE: A wor MUST be placed directly beeath the associated part of a give problem.*** PROBEM 1. (5pts) [Boo 3 rd ed. 1.1 / 4 th ed. 1.13] et ~Uiform[0,]. (a)(5pts) Setch the PDF for. The verify that the Area uder f ( x ) equals 1.0. f Figure 1(a) Plots of the PDF ad CDF for. (b)(5pts) (i)use calculus to compute the CDF for. (ii) Overlay a setch it o Figure 1(a). (iii) Use your CDF expressio to compute Pr[0.9 < < 1.1] (i). (ii) See Fig.1(a). (iii) (c)(5pts) Use the geeral relatio E [ g( x)] = g( x) f ( x) dx to calculate the followig: S (i) µ = E( ), (ii) E ( ), ad (iii) σ = Var( ). α x [Boo 1.15] et ~ f ( x) = α e ; x 0. Such a radom variable is said to have a expoetial distributio, with parameter α. [Here, view as time-to-failure.] 4 (d)(5pts) Suppose µ = E( ) = 10. Use calculus (i particular, itegratio by parts) to show that α = 10-4. (e)(5pts) Fid the time, x, such that the failure probability i the iterval [0, x] is 0.01.
PROBEM (5pts) et ~ N( µ 10, σ = ), ad let = { } = 1 be iid data collectio radom variables that will be used to estimate µ ad σ. (a)(5pts) Use the Matlab commad ormpdf to obtai a plot of f. I doig so, use the array of x-values x=0:.01:0. Be sure to label your axes, ad iclude a captio for this plot. [See code @ (a) i the Appedix.] Figure (a). Plots of true (blue) ad histogram-based (=1000) estimate (red) pdf for. { } = 1 (b)(10pts) Use the Matlab commad ormrd to simulate measuremets of for =1000. The use the commad hist [Do NOT use the commad histogram ] to arrive at a histogram-based estimate, call it f, of f. Use the bi-ceter array: x=0:1:0. Overlay this estimate i Figure (a). [NOTE: Use the rg( shuffle ) commad so that your data will be differet from that of other studets.] [See code @ (b).] The plot is give above. (c)(5pts) (i)for your data i (b), use the commads mea ad std to compute estimates stadard deviatio. [See code @ (c).] µ = σ = µ ad σ of the true mea ad (d)(5pts) Use the measure of mea-squared error (mse) to quatify how well the histogram-based estimate of the pdf is. To this ed, at the ceter poit, x, of the th bi, defie the error e = [ f ( x) f ( x)]. The, for a -bi based estimate of f, the estimated mse is mse = ( 1/ ) e. [See code @ (d).] mse = 1 =
PROBEM 3(5pts) To ivestigate the probability structure of your estimators of the mea ad stadard deviatio used i (b), ad of the mse estimator used i (c) of PROBEM, use 5000 simulatios to obtai estimates of (a)the mea, (b) the stadard deviatio ad (c) the pdf of each estimator. [See code @ PROBEM 3] (a)(6pts) the mea: Aswer: E ( µ ) = ; E( σ ) = ; E( mse) = (b)(6pts) the stadard deviatio: Aswer: Std ( µ ) = ; Std( σ ) = ; Std( mse) = (c)(13pts) estimator pdf : 3 Figure 3(c) PDFs for µ (top) ; σ (middle); mse (bottom).
PROBEM 4(5pts) I this problem you will address the total ucertaity i predictio of the oscillatio period of the pedulum show at right. This ucertaity has two compoets: (i) that associated with =The act of measurig the legth,, ad (ii) that associated with T m =The act of measurig the time it taes to complete m periods of oscillatio. To aswer questios related to this problem, you will eed to view https://www.youtube.com/watch?v=4a0fbqdh3dy with Professor ewi. (a)(4pts) Assume ~ N( µ = 5.1m, σ = 0.05m). Defie relative ucertaity as r = σ / µ 100%. Compute this value for, ad compare it to that value claimed by Prof. ewi. [Give the time stamp of his claim.] r =. Prof. ewi claims [@ time stamp ]. 4 (b)(6pts) To mathematically compute µ ad σ is very difficult. Use 10 6 simulatios to obtai their values. [See code @ 4(b)] µ = & σ =. (c)(6pts) Professor ewi claims that, because the percet relative ucertaity i is ~1%, the resultig ucertaity i calculatig the pedulum period T = ( π / g ) is oly ~0.5%. This is ot obvious. Use your aswers i (b) to arrive at (i) µ T, (ii) σ T, ad (iii) to verify his claim re: the relative ucertaity for T. [Give the time stamp.] Use g = 9.80m / s. [@ time stamp ] (d)(4pts) et Q ~ N(0, σ = Q 0.1s) deote the measuremet error associated with the stop-time after ay chose umber of pedulum swigs. Assume this error is idepedet of T. et W = mt + Q deote the act of measurig the stop-time of m pedulum oscillatios. The period estimator is the: T = W / m = T + Q / m. Arrive at the expressio for σ T as a fuctio of oly m. [Hits: T ad Q are idepedet. Also, Var( a ) = a Var( ).] (e)(5pts) Professor ewi claims that for m = 10 periods, the σ ucertaity i T is 0.0 sec. (i) Use your expressio i (d) to show that his claim is icorrect, ad the (ii) explai how he messed up. (i) (ii)
5 Appedix Matlab Code %PROGRAM NAME: hw1.m %PROBEM %(a) mx=10; sx=; x=0:0.01:0; fx=************ %PDF figure(0) plot(x,fx,'iewidth',) xlabel('x') title('pdf for ') grid % (b) =1000; rg('shuffle') = % x 1 data array bc= %bi ceters fxhat = %Histogram-based estimate of PDF hold o bar(bc,fxhat,'r') title('true (blue) & Estimated (red) PDFs ') %(c): m= %Sample mea s= %Sample std. dev. %(d): fxbc=ormpdf(bc,mx,sx); %============================================== %PROBEM 3 sim = 5000; figure(30) subplot(3,1,1),bar(bmx,fmx) title('estimated pdf for muhat') subplot(3,1,), bar(bsx,fsx) title('estimated pdf for sigmahat') subplot(3,1,3),bar(be,fe) title('estimated pdf for msehat') %============================================= %PROBEM 4 %4(b): mu=5.1; std=.05; sim=10^6; %4(e) verificatio: T= Q= That=