Bcoeff2 ccoeff3 dcoeff4 part c coeff1mylsx1logy11

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

View Full Document Right Arrow Icon
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
Image of page 7

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

View Full Document Right Arrow Icon
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' );
Image of page 8
%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' );
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern