CS 173: Discrete Mathematical Structures - Probability and Binomial Random Variables, Slides of Discrete Mathematics

The concepts of discrete mathematical structures, specifically focusing on binomial random variables. It includes examples of calculating the probability of a certain number of successes in a sequence of independent bernoulli trials and the expected value of a binomial random variable. The document also discusses the concept of variance.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atasi
atasi 🇮🇳

4.6

(32)

134 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 173:
Discrete Mathematical Structures
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download CS 173: Discrete Mathematical Structures - Probability and Binomial Random Variables and more Slides Discrete Mathematics in PDF only on Docsity!

CS 173:

Discrete Mathematical Structures

A Special Random Variable

A Binomial random variable X is a random variable

that counts the number of successes in a sequence of n independent Bernoulli trials, where the probability of success on each trial is p.

What are the possible values for X? 1, 2, …n

We want Pr(X = k), k = 1,…n.

From last time,

Pr(X = k) = C(n, k) p k^ (1-p)n-k

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 ) xD

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 )

nk

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)

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 there are N couples at a party, and suppose m people get sleepy and leave. What is the expected number of couples left?

X i =

1 if couple i remains,

0 otherwise.

E[X] = E[X 1 + X 2 + … + X (^) n]

Define r.v. X = X 1 + X 2 + … + X (^) n , and we want E[X].

= E[X 1 ] + E[X 2 ] + … + E[X (^) n] So what do we know about X (^) i?

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 there are N couples at a party, and suppose m people get sleepy and leave. What is the expected number of couples left?

X i =

1 if couple i remains,

0 otherwise.

E[X (^) i] = Pr(Xi = 1)

E[X 1 ] + E[X 2 ] + … + E[X (^) n]

(# of ways of choosing m from everyone else) /(# of ways of choosing m from all)

=

2N - 2 m

 

  2N m

 ^

 ^ = n x E[X^1 ]^ = (2N-m)(2N-m-1)/2(2N-1)

Variance

Definition: Let X be a r.v. on a sample space S. The variance of X, denoted by Var(X), is:

Var(X) = (X(s) − E[X])^2 s∈S

∑ Pr(X^ =^ s)

Theorem: If X is a r.v. on a sample space S, then

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

By algebra shown in your book, page 389.

Variance

What is difference between the following distributions?

k 0 1 2 P(k ) .1^ .8^.

k 0 1 2 P(k ) .4^ .2^.

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

k 0 1 4 P(k ) .1^ .8^.

k 0 1 4 P(k ) .4^ .2^.

E[X 2 ] = (0)(.1)+1(.8)+4(.1) = 1.2 E[X 2 ] = (0)(.4)+1(.2)+4(.4) = 1.

Var(X) = 1.2 - 1 = 0.2 Var(X) = 1.8 - 1 = 0.