# Discrete Random Variables

Pages: 9 (1322 words) Published: April 9, 2013
Mathematical Modelling 2
Week 3: Discrete Random Variables

Stephen Bush Department of Mathematical Sciences

MM2: Statistics

- Week 3 -

1

Random Variables
• Reference: Devore § 3.1 – 3.5 • Definitions:
• An experiment is any process of obtaining one outcome where the outcome is uncertain. • A random variable is a numerical variable whose value can change from one replicate of the experiment to another.

• Sample means and sample standard deviations are random variables • They are different from sample to sample. • Population means and standard deviations are not random. MM2: Statistics - Week 3 2

Random Variables - Examples
• Experiment 1: Pick a student at random from the class
• Let X denote the height of the student

• Experiment 2: Throw a fair dice
• Let X denote the outcome of the dice. X = 1,2,3,4,5, or 6.

• Notice that the outcome of both of these events changes every time you take a new sample.

MM2: Statistics

- Week 3 -

3

1

Random Variables
• A random variable can be continuous or discrete.
• Continuous random variables can take any real value, such as measurements. • Electrical current, length, pressure, temperature, time voltage, weight etc. • Discrete random variables are usually counts (whole numbers). • Number of scratches on a surface, proportion of defective parts among 1000 tested, number of transmitted bits received in error, number of vehicles on a bridge. • The methods that we use to analyse these random variables differ between continuous and discrete.

• Experiment 1 (Height): Continuous • Experiment 2 (Roll of Dice): Discrete MM2: Statistics - Week 3 4

Random Variables
• Decide whether a continuous or a discrete random variable is the best model for each of the following variables. • The life time of a biomedical device after implant in a patient. • The number of times a transistor in a computer memory changes state in one operation. • The strength of a concrete specimen. • The number of luxury options selected by an automobile buyer. • The proportion of defective solder joints on a circuit board. • The weight of an injection-moulded plastic part. • The number of particles in a sample of gas. MM2: Statistics - Week 3 5

Discrete Random Variables
• • A random variable X is said to be discrete if it can only be equal to a finite or countably infinite (e.g. ) number of distinct values. Example • There is a chance that a bit transmitted through a digital transmission channel is received in error. Let X equal the number of bits in the next four bits transmitted in error. Based on past data, we can determine that the probabilities for the possible values of X are: P(X=0) = 0.6561 P(X=1) = 0.2916 P(X=2) = 0.0486 P(X=3) = 0.0036 P(X=4) = 0.0001 MM2: Statistics - Week 3 6

2

Discrete Random Variables
• We can plot the probability mass function (pmf), the set of probabilities associated with each value that the discrete random variable may take. • Sometimes, we have a functional form for the probability mass function. • In other cases, we simply have a table of probabilities. • For example, the pmf in the example on the last slide is shown below

MM2: Statistics

- Week 3 -

7

Discrete Random Variables
• For a discrete random variable X with possible values x1, x2, ..., xn, the probability mass function is

where

and

• To calculate probabilities using f(x):

MM2: Statistics

- Week 3 -

8

Discrete Random Variables
• The cumulative distribution function of a discrete variable X is

• We should note that for discrete distributions

MM2: Statistics

- Week 3 -

9

3

Discrete Random Variables
The cumulative distribution function for our example is

MM2: Statistics

- Week 3 -

10

Expectation and Variance
• Suppose that the possible values of the random variable are x1, x2, ..., xn, and the pmf of X is f(x). • Then the expected value of X is

• The variance of X is

• Recall that the standard...