Docsity

Probability Theory: Conditional Probability, Independence, and Expected Value, Slides of Discrete Mathematics

Partial preview of the text

Download Probability Theory: Conditional Probability, Independence, and Expected Value and more Slides Discrete Mathematics in PDF only on Docsity!

CS 173:

Discrete Mathematical Structures

Conditional Probability

Let E and F be events with Pr(F) > 0. The conditional probability of E given F, denoted by Pr(E|F) is defined to be: Pr(E|F) = Pr(E∩F)/Pr(F).

E^ F

Independence

The events E and F are independent if and only if

Pr(E∩F) = Pr(E) x Pr(F).

Let E be the event that a family of n children has children of both sexes. Lef F be the event that a family of n children has at most one boy.

Are E and F independent if

n = 2? (^) No

Independence

The events E and F are independent if and only if

Pr(E∩F) = Pr(E) x Pr(F).

Let E be the event that a family of n children has children of both sexes. Lef F be the event that a family of n children has at most one boy.

Are E and F independent if

n = 3? (^) Yes

Independence

The events E and F are independent if and only if

Pr(E∩F) = Pr(E) x Pr(F).

Let E be the event that a family of n children has children of both sexes. Lef F be the event that a family of n children has at most one boy.

Are E and F independent if

n = 5? (^) No

Independence

The events E and F are independent if and only if

Pr(E∩F) = Pr(E) x Pr(F).

Let E be the event that a family of n children has children of both sexes.

Lef F be the event that a family of n children has at most one boy.

Are E and F independent if

n = 2?

n = 3?

n = 4?

n = 5?

No

Yes

No

No

Bernoulli Trials

A coin is tossed 8 times. What is the probability of exactly 3 heads in the 8 tosses?

THHTTHTT is a tossing sequence…

.5 8

How many ways of choosing 3 positions for the heads?

What is the probability of a particular sequence?

In general: The probability of exactly k successes in n independent Bernoulli trials with probability of success p, is C(n,k)pk^ (1-p)n-k

C(8,3)

Bernoulli Trials

A game of Jewel Quest is played 5 times. You clear the board 70% of the time. What is the probability that you win a majority of the 5 games?

Sanity check: What is the probability the the result is WWLLW?

In general: The probability of exactly k successes in n independent Bernoulli trials with probability of success p, is (^) C(n,k)pk (^) (1-p)n-k

.7 3 .3 2 Assumes independent trials

C(5,3)0.7 3 0.3 2 + C(5,4)0.7 4 0.3 1 + C(5,5)0.7 5 0.3 0

Random Variables

A probability distribution on a r.v. X is just an allocation of the total probability, 1, over the possible values of X.

How many movies have you watched in the last week?

Picture gives a probability distribution! The chart gives likelihood that a randomly selected student watched each of the particular numbers of movies.

a) 0 b) 1 c) 2 d) 3 e) 4

Random Variables

Example: Do you ever play the game Racko?

Suppose we are playing a game with cards labeled 1 to 20, and we draw 3 cards. We bet that the maximum card has value 17 or greater. What’s the probability we win the bet?

Filling in this box would be a pain. We look for a general formula.

Let r.v. X denote the maximum card value. The possible values for X are 3, 4, 5, …, 20.

i 3 4 5 6 7 8 9 … 20 Pr(X = i)????????

Expected Value

Let X be a discrete r.v. with set of possible values

D. The expected value of X is:

E ( X ) = x ⋅ Pr( X = x ) x ∈ D

∑

Let X denote your score on the coming midterm. Suppose I assign scores according to the following distribution:

i 55 65 80 90

Pr(X=i) 0.1 0.3 0.4 0.

Then E(X) = (55)(0.1) + 65(0.3) + (80)(0.4) + 90(0.2) = 75

Measure of central tendency.

Expected Value

Let X be a binomial r.v. with parameters n and p.

That is, X is the number of “successes” on n trials where each trial has probability of success p.

What is E(X)?

First we need Pr(X = k) = C(n, k) pk^ (1-p)n-k

E ( X ) = k ⋅

n

k

k = 0

n

∑ p^

k

(1− p )

n − k

Defn of Binomial Distribution.

Expected Value

Let X (^) i, i= 1,2,…,n, be a sequence of random variables, and suppose we are interested in their sum. The sum is a random variable itself with expectation given by:

The proof of this is inductive and algebraic. You can find it in your book on page 382.

E[ X (^) i i= 1

n ∑ ]^ =^ E[X^ i i= 1

n ∑ ]

CS 173

Expected Value

Define for i = 1, … n, a random variable:

E[ X (^) i i= 1

n ∑ ]^ =^ E[X^ i i= 1

n ∑ ]

Suppose you all (n) put your cell phones in a pile in the middle of the room, and I return them randomly. What is the expected number of students who receive their own phone back?

X i =

1 if student i gets the right phone,

0 otherwise.

k 0 1 Pr(Xi=k) 1-(1/n)^ 1/n

E[X (^) i] = a) 1/n b) 1/ c) 1 d) No clue E[X (^) i] = Pr(Xi = 1)