Question

In MATLAB, Plot the normal distribution, display the equation for the normal distribution on the graph...

In MATLAB, Plot the normal distribution, display the equation for the normal distribution on the graph (see the 1st equation on Wikipedia), and display the location for the mean and draw a vertical line at the mean plus and minus one standard deviation. Pick for the mean 17 and for the standard deviation e. Label the axes.

Homework Answers

Answer #1

>> x = randn(10000,1);
>> histfit(x)
hist(data,5)
mu=mean(data);
sg=std(data);
x=linspace(mu-4*sg,mu+4*sg,200);
pdfx=1/sqrt(2*pi)/sg*exp(-(x-mu).^2/(2*sg^2));
plot(x,pdfx);
STD = 1;
MEAN = 2;
x = -4:0.1:4;
f = ( 1/(STD*sqrt(2*pi)) ) * exp(-0.5*((x-MEAN)/STD).^2 );

hold on; plot (x,f);
y = randn(1000,1) + 2;
x = -4:0.1:6;

n = hist(y,x);

bar (x,n);

MEAN = mean(y);
STD = sqrt(mean((y - MEAN).^2));


f = ( 1/(STD*sqrt(2*pi)) ) * exp(-0.5*((x-MEAN)/STD).^2 );
f = f*sum(n)/sum(f);

hold on; plot (x,f, 'r', 'LineWidth', 2);

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + 3y' + 2y = 0. a) Solve it and set the c's to 1. Graph this transient solution using large dots in MATLAB. b) Now add on the right-hand side the linear term 12x. Solve the inhomogeneous equation y'' +...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + y = 0. a) Solve it and set the c's to 1. Graph this periodic solution using large dots in MATLAB. b) Now add on the right-hand side the term -cos(2x). Solve the forced harmonic oscillator y'' + y =...
1.​Draw a normal curve distribution for stocks that have an expected return of 10% and a...
1.​Draw a normal curve distribution for stocks that have an expected return of 10% and a standard deviation of 20%. Show the values for plus one and minus one standard deviation points
In a regression analysis, what assumption can be checked with a normal probability plot of the...
In a regression analysis, what assumption can be checked with a normal probability plot of the residuals, and what should one look for in such a plot? (A) x and y are correlated. Look for a straight line pattern. (B) The residuals all have the same variance. Look for a straight line pattern. The vertical variation in the plot should be roughly constant throughout the whole range of fitted values. (C) The residuals follow a normal distribution. Look for a...
Describe how you would draw and label a Normal distribution with mean of 100 and standard...
Describe how you would draw and label a Normal distribution with mean of 100 and standard deviation of 15.
Use Matlab to solve the following (a) Create a plot with a sphere at the center...
Use Matlab to solve the following (a) Create a plot with a sphere at the center of the graph (origin) representing the sun with a radius of 6955000 km. Make sure that the outside of the sphere is painted in ’autumn’ colors. (Hint: look up the sphere() function, the colormap() function, and the surf() function). (b) Create a variable t ranging from 0 to 2? with increments of 0.01. (c) The following Table gives you important values needed to compute...
Find the indicated z score. The graph depicts the standard normal distribution with mean 0 and...
Find the indicated z score. The graph depicts the standard normal distribution with mean 0 and standard deviation 1. z0.2266 0
Find the indicated z score. The graph depicts the standard normal distribution with mean 0 and...
Find the indicated z score. The graph depicts the standard normal distribution with mean 0 and standard deviation 1. Shaded area is 0.4013.
Find the area of the shaded region. The graph depicts the standard normal distribution of bone...
Find the area of the shaded region. The graph depicts the standard normal distribution of bone density scores with mean 0 and standard deviation 1. z=0.81 and z=1.23
Suppose that I take a sample of 10 observations from a Normal distribution whose true mean...
Suppose that I take a sample of 10 observations from a Normal distribution whose true mean ('mu') and standard deviation ('sigma') are unknown. If x-bar and s are the mean and standard deviation of the sample, which expression gives a 95% confidence interval for mu? x-bar plus and minus 1.96*sigma/square-root(10) x-bar plus and minus 1.96*sigma/square-root(10) x-bar plus and minus 2.262*s/square-root(10) x-bar plus and minus 2.228*s/square-root(10) x-bar plus and minus 2.262*s/square-root(9)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT