E7_Lab11_Solutions_Fall_2010

# Bcoeff2 ccoeff3 dcoeff4 part c coeff1mylsx1logy11

• Notes
• cfudalz
• 12
• 100% (1) 1 out of 1 people found this document helpful

This preview shows pages 7–10. Sign up to view the full content.

b=coeff(2) c=coeff(3) d=coeff(4) %part c coeff1=my_ls(x1,log(y1),1); a2=coeff1(1) b2=coeff1(2) %part d yr1=exp(a + b.*x1 + c.*x1.^2 + d.*x1.^3); yr2=exp(a2 + b2.*x1); clf plot(x1,y1, 'o' ,x1,yr1,x1,yr2) legend( 'given' , 'x^3' , 'x' ) a = 0 b = 2.0000 c = -2.0000 d = 5.0000 a2 = -2.3957 b2 = 8.6940

This preview has intentionally blurred sections. Sign up to view the full version.

problem 6 clf %part a ANY of the lower comments will satisfy % 1) For histograms the heights of the bars are equal to % the number data points falling within each bar's respective bins. % 2) For probability density functions the heights of the bars are chosen % so that the area of each bar is equal to the probability that a data % point falls within that bar's respective bin. % 3) The scale factor that converts histogram bar height to probability % density function y-coordinate is a function of bin width. Therefore, % if bin width varies, the height conversion factor varies with bin, % and the shape of the probability density function will differ from % the shape of the histogram. If the bin widths are constant the % scale factor is the same for all bins and, thus, the shape of the % probability density function will match the shape of the histogram. %part b uni=load( 'uniform.txt' ); subplot(1, 2, 1); makehist(0, 1, 0.01, uni, 'Random varriable value' , 'Count' ); subplot(1, 2, 2); makehist(0, 1, 0.05, uni, 'Random varriable value' , 'Count' );
%part c norm=load( 'norm.txt.' ); Lower = round(min(norm)); Upper = round(max(norm)); Width = 2; figure; hdat = makehist(Lower, Upper, Width, norm, 'Random variable value' , 'Count' );

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Spring '09
• probability density function, @, Hout, 1.9701 m, convert row vector

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern