You are on page 1of 15

Random Variables

usually written X, is a variable whose


possible values are numerical
outcomes of a random phenomenon.

There are two types of random


variables, discrete and continuous.
Discrete Random Variables

A discrete random variable is one which may take on only a


countable number of distinct values such as 0,1,2,3,4,........

Discrete random variables are usually (but not necessarily)


counts.

If a random variable can take only a finite number of distinct


values, then it must be discrete.

Examples of discrete random variables :

 the number of children in a family,


 the Friday night attendance at a cinema,
 the number of patients in a doctor's surgery,
 the number of defective light bulbs in a box of ten.
Discrete Random Variables

A random variable is a set of possible values from a random


experiment.
In a toss coin experiment, if we assign Head as 0 and Tail as 1,
then a random variable (denoted by a capital letter) will be
The probability distribution of a discrete random variable is a
list of probabilities associated with each of its possible values.
It is also sometimes called the probability function or the
probability mass function.

Suppose a random variable X may take k different values,


with the probability that X = x defined to be P(X = x) = f(x) = fx.

Discrete Probability Distribution: It is a mathematical function


(denoted as p(x) ) that satisfies the following properties: :

1. f(x) ≥ 0,
2. σ𝑥 𝑓 𝑥 = 1
3. P(X = x) = f(x)

Discrete probability distribution function is defined only for


integer values.
Example 1.

Flip 3 coins at the same time. How many heads are showing?

Let the random variable X – the number of heads showing

Raw Representation.

HHH  3 heads
HHT  2 heads
HTH  2 heads
HTT  1 head
THH  2 heads
THT  1 head
TTH  1 head
TTT  0 head
Probability Distribution

Outcome (heads) x 0 1 2 3
Probability P(X = x) 1/8 3/8 3/8 1/8
Example 2. Outcome (sum) Probability
x P(X = x)
Probability 2 1/36
Distribution for a 3 2/36
random variable X, 4 3/36
which would be the
5 4/36
sum of 2 rolled dice.
6 5/36
(probability 7 6/36
distribution of having 8 5/36
different sums 9 4/36
whenever the 2 dice 10 3/36
are rolled)
11 2/36
12 1/36
All random variables (discrete and continuous) have
a cumulative distribution function.

It is a function giving the probability that the random


variable X is less than or equal to x, for every value x.

For a discrete random variable, the cumulative distribution


function is found by summing up the probabilities.
Example.

A random variable X, representing a single dice roll has


cumulative distribution function
Continuous Random Variables

A continuous random variable differs from a discrete random


variable in that it takes on an uncountably infinite number of
possible outcomes.

For example,

let X denote the height (in meters) of a randomly selected


maple tree,

then X is a continuous random variable.


Continuous Probability Distribution

Any variable can have two types of values. Either


the values can be fix numbers which are also
known as discrete values or a specified range that
is known as continuous values.

Based on these types of values a data set is


defined as continuous or discrete.

In continuous data type, the values can be lying


anywhere within the range that is specified.
There are three basic differences between a continuous and
a discrete probability distribution:

i) The probability that a continuous variable will take a


specific value is equal to zero.

ii) Because of this, we can never express continuous


probability distribution in a tabular form.

iii) Thus we require an equation or a formula to describe such


kind of distribution. Such equation is termed as probability
density function.
Formula
A probability density function (pdf), f(x), given over a rage a ≤ x ≤ b
satisfies the following:

f(x) ≥ 0 for all values of ‘x′ lying between a and b.

The total area covered under the curve of the function lying in the
range a and b is equal to 1.

So the probability of this continuous variable can now be found out by


integrating this density function with respect to ‘x′ over the
interval [a, b].

𝒃
P(a ≤ x ≤ b) = ‫ 𝒂׬‬f(x)dx
Example 1.

Suppose for a random variable X:

f(x) = c𝒙𝟑 ; for 2 ≤ x ≤ 4 and 0 otherwise.


What value of c makes this a legitimate probability distribution?

Sol’n:

Legitimate prob. Dist.  2 conditions must be satisfied:

1. It can never take on negative values


2. Area under the entire curve = 1

3. ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥 = 1
Hence,

න 𝒄𝒙𝟑 𝒅𝒙 = 𝟏
𝟐

c = 1/60 (the constant that makes the function a legitimate


probability distribution.)

𝟏
f(x) = 𝒙𝟑 for 2 ≤ x ≤ 4 and 0 otherwise
𝟔𝟎

~plot~

You might also like