Outline

Discrete Probability - Random Variables

K. Subramani^{1}

1Lane Department of Computer Science and Electrical Engineering West Virginia University

8 February, 2011

Subramani  Probability Theory

Outline

Outline

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

1 Recap
2 Random Variables
3 Expectation
4 Expectation of a function of a random variable
5 Linearity of Expectation
6 Variance and Standard Deviation

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Recap

Main points

Random experiment, sample spaces, events, combining events, conditional probability, independence.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Random Variables

Motivation

In case of certain random experiments, we are not so much interested in the actual outcome, but in some function of the outcome, e.g., in the experiment of tossing two dice, we could be interested in knowing whether or not the the sum of the upturned faces is 7. We may not care whether the actual outcome is (1, 6), (6, 1), or ….

Example

Let X denote the random variable that is defined as the sum of two fair dice. What are the values that X can take?

P{X = 1} = 0

P\{X = 2\} = \frac{1}{36}

⋮
P\{X = 12\} = \frac{1}{36}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example

Example

Consider the experiment of tossing two fair coins; let Y denote the random variable that counts the number of heads. What values can Y take?

P\{Y = 0\} = \frac{1}{4}

P\{Y = 1\} = \frac{1}{2}

P\{Y = 2\} = \frac{1}{4}

Definition

A random variable that can take on only a countable number of possible values is said to be discrete. For a discrete random variable X, the probability mass function (pmf) p(a) is defined as:

p(a) = P{X = a}.

Some books refer to the probability mass function as the probability density function (pdf).

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Conditional Random Variables

Multiple random variables

More than one random variable can be defined on the sample space. For instance, consider the experiment of rolling two dice. We could define a random variable X that is the sum of the two upturned faces and another random variable Y that is the product of the two upturned faces. Let X and Y be two random variables defined on a sample space S. The function P{X = x and Y = y} is defined as the joint probability mass function of X and Y . For a fixed value y,

P{Y = y} = ∑_{x}P{X = x and Y = y}

Likewise, for a fixed value x,

P{X = x} = ∑_{y}P{X = x and Y = y}

Finally,

P\{X = x | Y = y\} = \frac{P\{X = x and Y = y\}}{P\{Y = y\}}

Subramani  Probability Theory

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Independence of Random Variables

Independent random variables

Two random variables X and Y are said to be independent, if

P{X = x and Y = y} = P{X = x} · P{Y = y}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Bernoulli Random Variable

Main idea

Consider an experiment which has exactly two outcomes; one is labeled a “success” and the other a “failure”. If we let the random variable X assume the value 1, if the experiment was a success and 0, if the experiment was a failure, then X is said to be a Bernoulli random variable. The probability mass function of X is given by:

p(1) = P{X = 1} = p
p(0) = P{X = 0} = 1 − p

where 0 ≤ p ≤ 1 is the probability that the experiment results in a success.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Bernoulli Random Variable

Main idea

Consider an experiment which has exactly two outcomes; one is labeled a “success” and the other a “failure”. If we let the random variable X assume the value 1, if the experiment was a success and 0, if the experiment was a failure, then X is said to be a Bernoulli random variable. The probability mass function of X is given by:

p(1) = P{X = 1} = p
p(0) = P{X = 0} = 1 − p

where 0 ≤ p ≤ 1 is the probability that the experiment results in a success.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Bernoulli Random Variable

Main idea

Consider an experiment which has exactly two outcomes; one is labeled a “success” and the other a “failure”. If we let the random variable X assume the value 1, if the experiment was a success and 0, if the experiment was a failure, then X is said to be a Bernoulli random variable. The probability mass function of X is given by:

p(1) = P{X = 1} = p
p(0) = P{X = 0} = 1 − p

where 0 ≤ p ≤ 1 is the probability that the experiment results in a success.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Bernoulli Random Variable

Main idea

Consider an experiment which has exactly two outcomes; one is labeled a “success” and the other a “failure”. If we let the random variable X assume the value 1, if the experiment was a success and 0, if the experiment was a failure, then X is said to be a Bernoulli random variable. The probability mass function of X is given by:

p(1) = P{X = 1} = p
p(0) = P{X = 0} = 1 − p

where 0 ≤ p ≤ 1 is the probability that the experiment results in a success.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Bernoulli Random Variable

Main idea

Consider an experiment which has exactly two outcomes; one is labeled a “success” and the other a “failure”. If we let the random variable X assume the value 1, if the experiment was a success and 0, if the experiment was a failure, then X is said to be a Bernoulli random variable. The probability mass function of X is given by:

p(1) = P{X = 1} = p
p(0) = P{X = 0} = 1 − p

where 0 ≤ p ≤ 1 is the probability that the experiment results in a success.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Binomial Random Variable

Motivation

Consider an experiment which consists of n independent Bernoulli trials, with the probability of success in each trial being p. If X is the random variable that counts the number of successes in the n trials, then X is said to be a Binomial Random Variable. The probability mass function of X is given by:

p(i) = P{X = i} = C(n, i) · p^{i} · (1 − p)^{n−i}, i = 0, 1, 2, … n

Example

Consider the experiment of tossing four fair coins. What is the probability that you will get two heads and two tails?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Example (contd.)

Solution

Let the event of heads turning up denote a “success.” Accordingly, we are interested in the probability of getting exactly two successes in four Bernoulli trials. As discussed above,

p(2) = C(4, 2) · ( \frac{1}{2} )^{2} · (1 − \frac{1}{2} )^{2}

= \frac{3}{8}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Geometric Random Variable

Motivation

Suppose that independent Bernoulli trials, each with probability p of success are performed until a success occurs. If X is the random variable that counts the number of trials until the first success, then X is said to be a geometric random variable. The probability mass function of X is given by:

p(i) = P{X = i} = (1 − p)^{i−1} · p, i = 1, 2, …

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Geometric Random Variable

Motivation

Suppose that independent Bernoulli trials, each with probability p of success are performed until a success occurs. If X is the random variable that counts the number of trials until the first success, then X is said to be a geometric random variable. The probability mass function of X is given by:

p(i) = P{X = i} = (1 − p)^{i−1} · p, i = 1, 2, …

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Geometric Random Variable

Motivation

Suppose that independent Bernoulli trials, each with probability p of success are performed until a success occurs. If X is the random variable that counts the number of trials until the first success, then X is said to be a geometric random variable. The probability mass function of X is given by:

p(i) = P{X = i} = (1 − p)^{i−1} · p, i = 1, 2, …

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

The Geometric Random Variable

Motivation

Suppose that independent Bernoulli trials, each with probability p of success are performed until a success occurs. If X is the random variable that counts the number of trials until the first success, then X is said to be a geometric random variable. The probability mass function of X is given by:

p(i) = P{X = i} = (1 − p)^{i−1} · p, i = 1, 2, …

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation

Definition

Let X denote a discrete random variable with probability mass function p(x). The expected value of X, denoted by E[X] is defined by:

E[X] = ∑_{x}x · p(x)

Note

E[X] is the weighted average of the possible values that X can assume, each value being weighted by the probability that X assumes that value.

Example

Let X denote the random variable that records the outcome of tossing a fair die. What is E[X]?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Bernoulli Random Variable

Example

Let X denote a Bernoulli Random Variable with p denoting the probability of success. What is E[X]? Solution:

E[X] = 1 · p + 0 · (1 − p)
= p

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Bernoulli Random Variable

Example

Let X denote a Bernoulli Random Variable with p denoting the probability of success. What is E[X]? Solution:

E[X] = 1 · p + 0 · (1 − p)
= p

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Bernoulli Random Variable

Example

Let X denote a Bernoulli Random Variable with p denoting the probability of success. What is E[X]? Solution:

E[X] = 1 · p + 0 · (1 − p)
= p

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Bernoulli Random Variable

Example

Let X denote a Bernoulli Random Variable with p denoting the probability of success. What is E[X]? Solution:

E[X] = 1 · p + 0 · (1 − p)
= p

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable

Example

Let X denote a Binomial Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  n ; ∑ ; i=0 i · p(i), by definition

=  n ; ∑ ; i=0 i · C(n, i) · pi · (1 − p)n−i

=  n ; ∑ ; i=0 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 i · \frac{n!}{i!(n − i)!} · pi · (1 − p)n−i

=  n ; ∑ ; i=1 \frac{n!}{(i − 1)!(n − i)!} · pi · (1 − p)n−i

=  n · p n ; ∑ ; i=1 \frac{(n − 1)!}{(i − 1)!(n − i)!} · pi−1 · (1 − p)n−i

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Binomial Random Variable (contd.)

Example

Substituting k = i − 1, we get,

E[X] =  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · (n − k − 1)!} · pk · (1 − p)n−k−1

=  n · p n−1 ; ∑ ; k=0 \frac{(n − 1)!}{k! · ((n − 1) − k)!} · pk · (1 − p)(n−1)−k

=  n · p n−1 ; ∑ ; k=0 C(n − 1, k) · pk · (1 − p)(n−1)−k

=  n · p · [p + (1 − p)]n−1, Binomial theorem
=  n · p · 1
=  n · p

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable

Example

Let X denote a Geometric Random Variable with parameters n and p. What is E[X]? Solution:

E[X] =  ∞ ; ∑ ; i=1 i · p(i), by definition

=  ∞ ; ∑ ; i=1 i · (1 − p)i−1 · p

=  ∞ ; ∑ ; i=1 i · qi−1 · p, where q = 1 − p

=  p · ∞ ; ∑ ; i=1 i · qi−1

=  p · ∞ ; ∑ ; i=1 \frac{d}{dq} [qi]

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a Geometric Random Variable (contd.)

Example

Solution:

E[X] =  p · \frac{d}{dq} [ ∞ ; ∑ ; i=1 qi]

=  p · \frac{d}{dq} [ \frac{q}{1 − q} ]

=  p · \frac{(1 − q) · \frac{d}{dq} [q] − q · \frac{d}{dq} [1 − q]}{(1 − q)2}

=  p · \frac{(1 − q) · 1 − q · (−1)}{(1 − q)2}

=  p · \frac{1}{(1 − q)2}

=  p · \frac{1}{p2}

=  \frac{1}{p}

□

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of a function of a random variable

Note

Often times, we are interested in a function of the random variable, rather than the random variable itself. For instance, in the coin-tossing experiment, we could be interested in the square of the number of successes. The question of interest then is how to determine the expectation of a function of a random variable, given that we only know the distribution of the random variable.

Example

Let X be a random variable, with the following pmf:

p(0) = 0.3, p(1) = 0.5, p(2) = 0.2

Compute E[X^{2}].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions of random variables (contd.)

Solution

Let Y = X^{2}. Observe that Y is also a random variable. What are the values that Y can take? 0, 1 and 4. Let us compute the pmf of Y . Note that,

P{Y = 0} = P{X^{2} = 0} = P{X = 0} = 0.3

Similarly,

P{Y = 1} = P{X^{2} = 1} = P{X = 1} = 0.5
P{Y = 4} = P{X^{2} = 4} = P{X = 2} = 0.2

Accordingly,

E[Y ] = E[X^{2}] = 0 · 0.3 + 1 · 0.5 + 4 · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions - The Direct Approach

Theorem

If X is a random variable with pmf p(), and g() is any real-valued function, then,

E[g(X)] = ∑_{x: p(x)>0}g(x) · p(x)

Note

Applying the above theorem to the previous problem,

E[X^{2}] = 0^{2} · 0.3 + 1^{2} · 0.5 + 2^{2} · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions - The Direct Approach

Theorem

If X is a random variable with pmf p(), and g() is any real-valued function, then,

E[g(X)] = ∑_{x: p(x)>0}g(x) · p(x)

Note

Applying the above theorem to the previous problem,

E[X^{2}] = 0^{2} · 0.3 + 1^{2} · 0.5 + 2^{2} · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions - The Direct Approach

Theorem

If X is a random variable with pmf p(), and g() is any real-valued function, then,

E[g(X)] = ∑_{x: p(x)>0}g(x) · p(x)

Note

Applying the above theorem to the previous problem,

E[X^{2}] = 0^{2} · 0.3 + 1^{2} · 0.5 + 2^{2} · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions - The Direct Approach

Theorem

If X is a random variable with pmf p(), and g() is any real-valued function, then,

E[g(X)] = ∑_{x: p(x)>0}g(x) · p(x)

Note

Applying the above theorem to the previous problem,

E[X^{2}] = 0^{2} · 0.3 + 1^{2} · 0.5 + 2^{2} · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of functions - The Direct Approach

Theorem

If X is a random variable with pmf p(), and g() is any real-valued function, then,

E[g(X)] = ∑_{x: p(x)>0}g(x) · p(x)

Note

Applying the above theorem to the previous problem,

E[X^{2}] = 0^{2} · 0.3 + 1^{2} · 0.5 + 2^{2} · 0.2 = 1.3

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Linearity of Expectation

Proposition

Let X_{1}, X_{2}, …, X_{n} denote n random variables, defined over some probability space. Let a_{1}, a_{2}, …, a_{n} denote n constants. Then,

E[∑_{i=1}^{n}a_{i} · X_{i}] = ∑_{i=1}^{n}a_{i} · E[X_{i}]

Note

Note that linearity of expectation holds even when the random variables are not independent.

Example

What is the expected value of the sum of the upturned faces, when two fair dice are tossed?

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Expectation of product

Independent random variable

If X and Y are independent random variables (i.r.v.s), then

E[X · Y ] = E[X] · E[Y ]

.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Another Application

Example

Compute the expected value of the Binomial random variable.

Solution

Define

Xi  =  1, if the ith trial is a success
=  0, otherwise

Accordingly, the Binomial random variable (say X) can be expressed as:

X = X1 + X2 + … Xn

However, each Xi is Bernoulli random variable with probability of success p! Hence, using linearity of expectation,

E[X] =  E[X1 + X2 + … Xn]
=  n ; ∑ ; i=1 E[Xi]

=  n ; ∑ ; i=1 p_{=  n · p}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Definition

Basics

The expected value of a random variable does not contain any information about the “spread” of values. For instance, E[X] = \frac{1}{2} for the distribution P\{X = 0\} = P\{X = 1\} = \frac{1}{2} and the distribution P\{X = \frac{1}{4}\} = P\{X = \frac{3}{4}\} = \frac{1}{2}. The variance of a random variable X, with mean E[X] is:

Var[X] = E[(X − E[X])^{2}]
= E[X^{2}] − (E[X])^{2}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Definition

Basics

The expected value of a random variable does not contain any information about the “spread” of values. For instance, E[X] = \frac{1}{2} for the distribution P\{X = 0\} = P\{X = 1\} = \frac{1}{2} and the distribution P\{X = \frac{1}{4}\} = P\{X = \frac{3}{4}\} = \frac{1}{2}. The variance of a random variable X, with mean E[X] is:

Var[X] = E[(X − E[X])^{2}]
= E[X^{2}] − (E[X])^{2}

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Laws of Variances

Note

(i) If a is a constant, then Var[aX] = a^{2}Var[X].

(ii) If X_{1}, X_{2}, … X_{n} are independent random variables, then Var[∑_{i=1}^{n} X_{i}] = ∑_{i=1}^{n} Var[X_{i}].

Standard Deviation

The positive square root of the variance of a random variable is called its standard deviation.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Laws of Variances

Note

(i) If a is a constant, then Var[aX] = a^{2}Var[X].

(ii) If X_{1}, X_{2}, … X_{n} are independent random variables, then Var[∑_{i=1}^{n} X_{i}] = ∑_{i=1}^{n} Var[X_{i}].

Standard Deviation

The positive square root of the variance of a random variable is called its standard deviation.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Laws of Variances

Note

(i) If a is a constant, then Var[aX] = a^{2}Var[X].

(ii) If X_{1}, X_{2}, … X_{n} are independent random variables, then Var[∑_{i=1}^{n} X_{i}] = ∑_{i=1}^{n} Var[X_{i}].

Standard Deviation

The positive square root of the variance of a random variable is called its standard deviation.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Exercises

Exercise

Compute the variances of the following random variables:

(i) Bernoulli random variable.

(ii) Binomial random variable.

(iii) Geometric random variable.

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Computing Expectations by conditioning

Function of a random variable

Let X and Y denote two random variables. What is E[X | Y ]? E[X | Y ] is that function of the random variable Y whose value at Y = y is E[X | Y = y].

Lemma

E[X] = E[E[X | Y ]].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Computing Expectations by conditioning

Function of a random variable

Let X and Y denote two random variables. What is E[X | Y ]? E[X | Y ] is that function of the random variable Y whose value at Y = y is E[X | Y = y].

Lemma

E[X] = E[E[X | Y ]].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Computing Expectations by conditioning

Function of a random variable

Let X and Y denote two random variables. What is E[X | Y ]? E[X | Y ] is that function of the random variable Y whose value at Y = y is E[X | Y = y].

Lemma

E[X] = E[E[X | Y ]].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Computing Expectations by conditioning

Function of a random variable

Let X and Y denote two random variables. What is E[X | Y ]? E[X | Y ] is that function of the random variable Y whose value at Y = y is E[X | Y = y].

Lemma

E[X] = E[E[X | Y ]].

Recap

Random Variables

Expectation

Expectation of a function of a random variable

Linearity of Expectation

Variance and Standard Deviation

Computing Expectations by conditioning

Function of a random variable

Let X and Y denote two random variables. What is E[X | Y ]? E[X | Y ] is that function of the random variable Y whose value at Y = y is E[X | Y = y].

Lemma

E[X] = E[E[X | Y ]].