You are on page 1of 21

Random Variables and Probability Distributions

(partial)
Ravindra S. Gokhale IIM Indore
1

Random Variables
A variable that associates a number with the outcome of a random experiment is a random variable Denoted by an uppercase letter such as X, Y, etc.

A random variable can take only numeric values.

Toss of a coin is NOT a random variable. [It is an experiment that yields random results]

However, number of heads from toss of a coin is a random


variable
2

Random Variables
Examples:

If two dice are thrown, the sum of the faces is a random variable, as in:

X = 3, X = 11, etc.
If two coins are tossed, then the number of heads is a random variable, as in: X = 0, X = 2, etc. In a speed (rpm) measurement: X = 457, X = 1209, etc. In a dimension measurement with the help of a caliper: X = 23.46, X = 48.97, etc.

Random Variables (cont)


Discrete Random Variables A random variable with a finite or countable infinite range Examples:

Number of scratches on a car surface Proportion of defective parts among 1000 tested Number of people arriving at a bank in a given time interval

Random Variables (cont)


Continuous Random Variables A random variable with an interval (either finite or infinite) of real numbers for its range Examples:

Length dimension (like surface area of a table) Time dimension (like time between failure for a machine) Temperature dimension (like temperature inside a room)

Random Variables (cont)


Discrete or Continuous? Population in a particular state of India. Total weight of consignments handled by a courier company in a

day.
Time to complete an exam. Number of participants in an exit poll. Total number of goals scored in a football game. Life of a particular medicine. Height of the Ocean's tide at a given location. Amount of rain on a particular day. Number of train derailments in a year.

Random Variables (cont)


Expression of Random Variables The manner in which random variables are expressed sometimes depends on the problem at hand

Sometimes

a random variable is discrete in nature, but it is

treated continuous

This is because the range of values it can take is too large Example: Marks of a student in a 100 marks paper

Random Variables (cont)


Expression of Random Variables Sometimes a random variable is continuous in nature, but it is treated discrete

This is because the exact value (to the smallest level) is not required
Example: Age of a person may be expressed as a discrete random variable forming different categories: 0-21, 21-35, 35-50, 50-65, 65+

Probability Distributions
Probability distribution of a random variable X is a formula, table, or graph that gives all possible values of X and corresponding probabilities P(X = x) for all x's in the domain of X.

Example: Probability distribution of roll of a dice:


x P(X = x) 1 1/6 2 1/6 3 1/6 4 1/6 5 1/6 6 1/6

Probability Distributions
Standard probability models (probability distributions) are available in the literature and have been studied in detail.

These models can mimic many real life scenarios very well and have mathematically tractable representation.

10

Discrete Random Variables


Examples:

If two coins are tossed and we are interested in the event number of heads obtained, then:
P(X = 0) = 0.25 P(X = 2) = 0.25 P(X = 1) = 0.50 P(X = 3) = 0

P(X > 1) = 1 [P(X = 0) + P(X = 1)] = 1 (0.25 + 0.50) = 0.25

In a lot that contains 10% defective pieces, if we are interested in the


number of defective pieces in a sample of 5 then:
P(X = 0) = 0.590 P(X = 2) = 0.073 P(X = 1) = 0.328 P(X = 3) = 0.008

P(X = 4) 0.001

P(X = 5) 0.000

P(X <= 2) = P(X = 0) + P(X = 1) + P(X = 2) = 0.590 + 0.328 + 0.073 = 0.991


11

Discrete Random Variables (cont)


Terminologies associated with discrete random variables

Probability mass function (pmf) denoted by f(x) Cumulative distribution function (cdf) denoted by F(x)

1 5/6 F(x) 4/6 3/6 f(x) x 0 1 2 3 4 5 6 x 2/6 1/6

Probability mass function of a fair dice

Cumulative distribution function of a fair dice

f(xi) = P(X = xi)

F(x) = P(X <= x) = f(xi)


xi <= x

12

Discrete Random Variables (cont)


Mean and Variance of a Discrete Random Variables Mean of a discrete random variables

Mean is the expected value of the random variable denoted by

or E(X)
It is the measure of the center of the probability distribution Formula:
= E(X) = x f(x)
x

If we make infinite number of draws from the distribution of a random variable and calculate the average of the data then the average is the expected value (or mean) of the random variable.

Note: The expected value should not be confused with most likely value.
13

Discrete Random Variables (cont)


Mean and Variance of a Discrete Random Variables A simple example:

You can insure a Rs.500,000 jewellery against theft for its total
value by annual premium of Rs. R. If the probability of theft in a given year is estimated to be 0.01, what premium should the insurance company charge if it wants an annual expected gain equal to Rs. 10,000?

14

Discrete Random Variables (cont)


Mean and Variance of a Discrete Random Variables

Variance of a discrete random variables

Denoted by 2 or V(X)
It is the measure of the dispersion or variability in the probability distribution Formula: 2 = V(X) = (x )2 f(x) = [ x2 f(x)] 2
x x

The standard deviation () of X is the (positive) square root of the variance

15

Continuous Random Variables


Examples:

When a machine breaks down, it is serviced. It runs for some time until it again breaks down. We are interested in the event time (in hours) between successive breakdowns, then:
P(X < 10) = ? P(50 < X < 150) = ? P(X > 250) = ?

A finance executive wants to predict the various financial ratios (say X,


Y, etc.) of different organizations, based on past data. For a particular organization, he may be interested in:
P(X > 0.75) = ? P(Y < 0.6) = ?

P(0.35 < X < 0.50) = ?

16

Continuous Random Variables (cont)


Terminologies associated with continuous random variables

Probability density function (pdf) denoted by f(x) Cumulative distribution function (cdf) denoted by F(x) cdf pdf
An alternative way to represent the distribution Extends the definition of f(x) to the entire real line F(x) = P(X <= x) = f(u) du for x Example:
- x

Resembles a histogram Used to calculate an area that represents the probability that X takes the values between [a, b] P(a <= X <= b) = f(x) dx
a b

Important: Probability that a continuous random variable takes a particular value is zero.
17

Continuous Random Variables (cont)


Mean and Variance of a Continuous Random Variables Mean of a continuous random variables

Defined similarly to that of a discrete random variable

Denoted by or E(X)
Formula:

E(X) [x f(x)] dx

Variance of a continuous random variables

Defined similarly to that of a discrete random variable Denoted by 2 or V(X) Formula:


V(X) { [x - ] f(x) dx} { [x 2 f(x)] dx} - 2


2 2

The standard deviation () of X is the square root of the variance

18

Problems
pdf, mean and variance of Continuous Random Variables The probability density function of the length of a metal rod is f(x) = 2 for 2.3 < x < 2.8 meters

If the specifications of this process are 2.25 to 2.75 meters, what


proportion of the rods fail to meet the specifications? Determine the mean and the variance of the length of the metal rod

19

Bernoulli Trial
A basic building block for all the discrete probability distributions A trial has only two possible outcomes

Usually termed as: success and failure

Examples:

Did tossing of a coin lead to a head (success) or not?

Did the student pass the exam (success) or not?


Did India lose the match (success) or not? Was the part defective (success) or not?

Probability of success is denoted by p

20

Bernoulli Trial
Mean of a Bernoulli Trial = p Variance of a Bernoulli Trial = p (1 p)

Derive

21