To find the probability of a normal distribution in MATLAB, you can use the normpdf
and normcdf
functions.
normpdf
calculates the probability density function (PDF) of the normal distribution at a given point, and normcdf
calculates the cumulative distribution function (CDF) of the normal distribution up to a given point.
Here's an example of using normpdf
and normcdf
to find the probability of a random variable between two values a
and b
in a normal distribution with mean mu
and standard deviation sigma
:
main.m282 chars6 lines
Here, P
will give you the probability of the random variable being between -1
and 1
in a normal distribution with mean 0 and standard deviation 1.
gistlibby LogSnag