elec 303, koushanfar, fall’09 elec 303 – random signals lecture 4 – counting farinaz...

14
ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

Upload: kerry-bates

Post on 01-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

ELEC 303 – Random Signals

Lecture 4 – CountingFarinaz Koushanfar

ECE Dept., Rice UniversitySept 3, 2009

Page 2: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Lecture outline

• Reading: Section 1.6• Review• Counting– Principle– Permutations– Combinations– Partitions

Page 3: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Independence - summary

• Two events A and B are independent if• P(AB)=P(A).P(B) (Symmetric)• If also, P(B)>0, independence is equivalent to• P(A|B)=P(A)• A and B conditionally independent if given C,

P(C)>0, P(AB|C)=P(A|C)• Independence does not imply conditional

independence and vice versa

Page 4: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Review: independent trials and the Binomial probabilities

• Independent trials: sequence of independent but identical stages

• Bernoulli: there are 2 possible results at each stage

Figure courtesy of Bertsekas&Tsitsiklis, Introduction to Probability, 2008

Page 5: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Review: Bernoulli trial

• P(k)=P(k heads in an n-toss sequence)• From the previous page, the probability of any

given sequence having k heads: pk(1-p)n-k

• The total number of such sequences is

• Where we define the notation

knk ppk

n

)1(

nkknk

n

k

n,...,1,0

)!(!

!

Page 6: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Counting: discrete Uniform law

• Let all sample points be equally likely

• Counting is not always simple – challenging• Parts of counting has to do with combinatorics• We will learn some simple rules to help us

count better

space sample in the points ofnumber

Ain elements ofnumber )( AP

Page 7: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Counting principal

• r steps• At step i, there are ni choices

• Total number of choices n1,n2,…,nr

Figure courtesy of Bertsekas&Tsitsiklis, Introduction to Probability, 2008

Page 8: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Two examples

• The number of telephone numbers

• The number of subsets of an n-element set

Permutations and combinations

Page 9: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

k-Permutations

• The order of selection matters!• Assume that we have n distinct objects• k-permutations: find the ways that we can pick

k out of these objects and arrange them in a certain order

• Permutations: k=n case• Example: Probability that 6 rolls of a six-sided

die give different numbers

)!(

!)1)...(2)(1(

kn

nknnnn

Page 10: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Combinations

• There is no certain order of the events• Combinations: number of k-element subsets

of a given n-element set• Two ways of making an ordered sequence of

k-distinct items:– Choose the k items one-at-a-time– Choose k items then order them (k! possibilities)– Thus,

)!(

!

kn

n

k

n

nkknk

n

k

n,...,1,0

)!(!

!

Page 11: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Different sampling methods

• Draw k balls from an Urn with n balls– Sampling with replacement and ordering– Sampling without replacement and ordering– Sampling with replacement without ordering– Sampling without replacement with ordering

Page 12: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Partitions

• Given an n-element set and nonnegative integers n1,n2,…,nr whose sum is n

• How many ways do we have to form the first subset? The second?...

• The total number of choices

r

r

n

nnnn

n

nnn

n

nn

n

n 121

3

21

2

1

1

......

• Several terms cancel:!!...!

!

21 rnnn

n

Page 13: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Examples

• The 52 cards are dealt to 4 players• Find the probability that each one gets an

ace?• Count the size of the sample space

• Count the number of possible ways for Ace distribution• Count the number of ways to

Distribute the rest of 48 cards

Page 14: ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 4 – Counting Farinaz Koushanfar ECE Dept., Rice University Sept 3, 2009

ELEC 303, Koushanfar, Fall’09

Summary of counting results

• Permutations of n objects: n!• k-Permutations of n objects: n!/(n-k)!• Combinations of k out of n objects:• Partitions of n objects into r groups,

with the ith group having ni objects:

)!(!

!

knk

n

k

n

!!...!

!

,...,, 2121 rr nnn

n

nnn

n