2.9. PROBABILITY FUNCTIONS 51
manually determine the lower boundary and upper boundary of each bin and arrange them in
another column; and (3) activate the “Data Analysis,” select “Histogram” and then follow the
pop-up instructions in the prompt window. e “Data Analysis” will automatically count the
frequencies in each bin per Equation (2.32) and create the histogram.
Histogram can be easily created in MATLAB by the following command:
histogram .X; J /;
where “X ” is a matrix which contains all of the sample data of a random variable. “J ” is the num-
ber of bins, which is typically larger than or equal to 6. Execution of the command “histogram
(X, J )” will automatically create a histogram.
2.9 PROBABILITY FUNCTIONS
2.9.1 PROBABILITY FUNCTIONS OF A CONTINUOUS RANDOM
VARIABLE
When the sample size of a continuous random variable is infinite, and the bin width is infinites-
imal, the relative-density frequency, as shown in Figure 2.8 and discussed in the previous section
will be a PDF.
Probability Density Function(PDF): For a continuous random variable X , the function f .x/
is defined as a probability per unit of random variable value, named as PDF if it satisfies the
following three conditions:
f
.
x
/
0 1 < x < 1 (2.34)
P
.
a X b
/
D
Z
b
a
f
.
x
/
dx (2.35)
P
.
1 X 1
/
D
Z
1
1
f
.
x
/
dx D 1: (2.36)
Any function can be used as a PDF of a continuous random variable if it satisfies Equa-
tions (2.34), (2.35), and (2.36).
e physical meaning of f .x/ is the probability per unit of the random variable value,
which is similar to the mass per unit length or the loading per unit length in beam theory. Since
f .x/ is related to probability, a negative value of f .x/ has no physical meaning. erefore, f .x/
must be large than or equal to 0, as shown in Equation (2.34).
Per the definition of
f .x/
, the probability of the event
.x
X
x
C
dx/
is equal to
f .x/dx, that is, P
.
x X x C dx
/
D f
.
x
/
dx. So, the probability of the event .a X b/
will be equal to
R
b
a
f
.
x
/
dx, as shown in Equation (2.35).
Event
.
1 X 1
/
is a universal set of a continuous random variable. erefore, the
probability of the event
.
1 X 1
/
is certainly equal to 1, as shown in Equation (2.36).