0% found this document useful (0 votes)
31 views2 pages

Matlab Codeg of PN Sequences

The document discusses finding the probability density function (pdf) of a random variable using MATLAB. It provides the theory behind pdfs, explaining that they describe the relative likelihood of a random variable taking a particular value, and that the probability of a value falling within a range is given by the area under the pdf between the bounds of that range. It notes some alternative terminology used for pdfs that is not standard. The MATLAB code then generates a normal distribution pdf curve with given mean and standard deviation as an example.

Uploaded by

Lindsay Cook
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Matlab Codeg of PN Sequences

The document discusses finding the probability density function (pdf) of a random variable using MATLAB. It provides the theory behind pdfs, explaining that they describe the relative likelihood of a random variable taking a particular value, and that the probability of a value falling within a range is given by the area under the pdf between the bounds of that range. It notes some alternative terminology used for pdfs that is not standard. The MATLAB code then generates a normal distribution pdf curve with given mean and standard deviation as an example.

Uploaded by

Lindsay Cook
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Aim- To find probability density function of a random variable.

Software used- MATLAB


TheoryIn probability theory, a probability density function (pdf), or density of a continuous random
variable, is a function that describes the relative likelihood for this random variable to take on a
given value. The probability of the random variable falling within a particular range of values is
given by the integral of this variables density over that rangethat is, it is given by the area
under the density function but above the horizontal axis and between the lowest and greatest
values of the range. The probability density function is nonnegative everywhere, and its integral
over the entire space is equal to one.
The terms "probability distribution function" and "probability function" have also sometimes
been used to denote the probability density function. However, this use is not standard among
probabilities and statisticians. In other sources, "probability distribution function" may be used
when the probability distribution is defined as a function over general sets of values, or it may
refer to the cumulative distribution function, or it may be a probability mass function rather than
the density. Further confusion of terminology exists because density function has also been used
for what is here called the "probability mass function".

Programclc;
close all;
clear all;
u=1;
sigma=3;
x = -10:0.1:10;
p = exp(-(x-u).*(x-u)/(2*sigma^2))/(sqrt(2*pi)*sigma);
plot(p);
title('PDF Curve');
xlabel('X
---------->');
ylabel('P(x)
---------->');

Output-

PDF Curve

0.14
0.12

P(x)

---------->

0.1
0.08
0.06
0.04
0.02
0

50

100
150
X ---------->

200

250

You might also like