Lecture 8: Conditional Expectation Ziyu Shao School of Information - - PDF document

lecture 8 conditional expectation
SMART_READER_LITE
LIVE PREVIEW

Lecture 8: Conditional Expectation Ziyu Shao School of Information - - PDF document

Lecture 8: Conditional Expectation Ziyu Shao School of Information Science and Technology ShanghaiTech University Nov. 16, 2018 Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation Nov. 16, 2018 1 / 130 Outline Conditional


slide-1
SLIDE 1

Lecture 8: Conditional Expectation

Ziyu Shao

School of Information Science and Technology ShanghaiTech University

  • Nov. 16, 2018

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

1 / 130

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

2 / 130

slide-2
SLIDE 2

Motivation

Conditional expectation is a powerful tool for calculating expectations: first-step analysis Conditional expectation allows us to predict or estimate unknowns based on whatever evidence is currently available. Conditional Expectation given an event: E(Y |A) Conditional Expectation given a random variable: E(Y |X)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

3 / 130

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

4 / 130

slide-3
SLIDE 3

Conditional Expectation Given An Event

Definition

Let A be an event with positive probability. If Y is a discrete r.v., then the conditional expectation of Y given A is E (Y |A) =

  • y

yP (Y = y|A) , where the sum is over the support of Y . If Y is a continuous r.v. with PDF f , then E (Y |A) = ∞

−∞

yf (y|A) dy, where the conditional PDF f (y|A) is defined as the derivative of the conditional CDF F(y|A) = P(Y ≤ y|A), and can also be computed by a hybrid version of Bayes’ rule: f (y|A) = P (A|Y = y) f (y) P (A) .

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

5 / 130

Intuition for E(Y |A)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

6 / 130

slide-4
SLIDE 4

Intuition for E(Y |A)

Principle

E(Y |A) is approximately the average of Y in a large number of simulation runs in which A occurred.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

7 / 130

Life Expectancy

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

8 / 130

slide-5
SLIDE 5

Law of Total Expectation

Theorem

Let A1, ..., An be a partition of a sample space, with P(Ai) > 0 for all i, and let Y be a random variable on this sample space. Then E (Y ) =

n

  • i=1

E (Y |Ai) P (Ai) .

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

9 / 130

Two-envelope Paradox

A stranger presents you with two identical-looking, sealed envelopes, each

  • f which contains a check for some positive amount of money. You are

informed that one of the envelopes contains exactly twice as much money as the other. You can choose either envelope. Which do you prefer: the

  • ne on the left or the one on the right? (Assume that the expected

amount of money in each envelope is finite—certainly a good assumption in the real world!)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

10 / 130

slide-6
SLIDE 6

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

11 / 130

Geometric Expectation Redux

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

12 / 130

slide-7
SLIDE 7

Time until HH vs. HT

You toss a fair coin repeatedly. What is the expected number of tosses until the pattern HT appears for the first time? What about the expected number of tosses until HH appears for the first time?

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

13 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

14 / 130

slide-8
SLIDE 8

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

15 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

16 / 130

slide-9
SLIDE 9

Mystery Prize

You have an opportunity to bid on a mystery box containing a mystery prize! The value of the prize is completely unknown. The true value V of the prize is considered to be Uniform on [0, 1] (measured in millions of dollars). You can choose to bid any amount b (in millions of dollars). Specifically, if b < 2V /3, then the bid is rejected and nothing is gained or

  • lost. If b ≥ 2V /3, then the bid is accepted and your net payoff is V − b

(since you pay b to get a prize worth V ). What is your optimal bid b, to maximize the expected payoff?

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

17 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

18 / 130

slide-10
SLIDE 10

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

19 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

20 / 130

slide-11
SLIDE 11

Auction

From Roman Empire to U.S.A government, eBay and Google

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

21 / 130

Online Ad Spaces

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

22 / 130

slide-12
SLIDE 12

Balance between Ad & Useful Information

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

23 / 130

Top20 Most Expensive Adwords: Google

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

24 / 130

slide-13
SLIDE 13

How To Sell Online Ad Spaces?

Different goals: Sellers & Buyers 1994: Impression-based ($ per 1000 impressions) 1997: Click-based 2002: Auction-based

◮ Google AdWords ◮ Search advertisements / sponsored content Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

25 / 130

Auction for Online Ad Spaces

1 seller (Google) N buyers (advertisers) K items (ad spaces) Buyers: submit bids Seller:

◮ Allocate items to buyers ◮ Charge each buyer Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

26 / 130

slide-14
SLIDE 14

Auctions

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

27 / 130

Auctions

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

28 / 130

slide-15
SLIDE 15

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

29 / 130

Conditional Expectation Given An R.V.

Definition

Let g(x) = E(Y |X = x). Then the conditional expectation of Y given X, denoted E(Y |X), is defined to be the random variable g(X). In other words, if after doing the experiment X crystallizes into x, then E(Y |X) crystallizes into g(x).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

30 / 130

slide-16
SLIDE 16

Remark

E(Y |X) is a function of X, and it is a random variable. It makes sense to computer E(E(Y |X)) and Var(E(Y |X)).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

31 / 130

Example: Stick Length

Suppose we have a stick of length 1 and break the stick at a point X chosen uniformly at random. Given that X = x, we then choose another breakpoint Y uniformly on the interval [0, x]. Find E(Y |X), and its mean and variance.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

32 / 130

slide-17
SLIDE 17

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

33 / 130

Another Example

For X, Y i.i.d. ∼ Expo (λ), find E(max(X, Y )| min(X, Y )).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

34 / 130

slide-18
SLIDE 18

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

35 / 130

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

36 / 130

slide-19
SLIDE 19

Dropping What’s Independent

Theorem

If X and Y are independent, then E(Y |X) = E(Y ).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

37 / 130

Taking Out What’s Known

Theorem

For any function h, E (h (X) Y |X) = h (X) E (Y |X)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

38 / 130

slide-20
SLIDE 20

Example

Let Z ∼ N(0, 1) and Y = Z 2. Find E(Y |Z) and E(Z|Y ).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

39 / 130

Linearity

Theorem

E(Y1 + Y2|X) = E(Y1|X) + E(Y2|X).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

40 / 130

slide-21
SLIDE 21

Example

Let X1, ..., Xn be i.i.d., and Sn = X1 + · · · + Xn. Find E(X1|Sn).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

41 / 130

Adam’s Law

Theorem

For any r.v.s X and Y , E(E(Y |X)) = E(Y ).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

42 / 130

slide-22
SLIDE 22

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

43 / 130

Adam’s Law and LOTE

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

44 / 130

slide-23
SLIDE 23

Adam’s Law with Extra Conditioning

Theorem

For any r.v.s X, Y , Z, we have E(E(Y |X, Z)|Z) = E(Y |Z) E(E(X|Z, Y )|Y ) = E(X|Y )

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

45 / 130

Example

Z = X, E(X|Z, Y ) = E(X|X, Y ) = X ,thus E[E(X|Z, Y )|Y ] = E(X|Y ). X = Z + Y , E(X|Z, Y ) = E(Z + Y |Z, Y ) = Z + Y ,thus E[E(X|Z, Y )|Y ] = E(Z + Y |Y ) = E(Z|Y ) + Y .

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

46 / 130

slide-24
SLIDE 24

Conditional Variance

Definition

The conditional variance of Y given X is Var (Y |X) = E

  • (Y − E (Y |X))2 |X
  • .

This is equivalent to Var (Y |X) = E

  • Y 2|X
  • − (E (Y |X))2 .

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

47 / 130

Example

Let Z ∼ N(0, 1) and Y = Z 2. Find Var(Y |Z) and Var(Z|Y ).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

48 / 130

slide-25
SLIDE 25

Eve’s law

Theorem

For any r.v.s X and Y , Var (Y ) = E (Var (Y |X)) + Var (E (Y |X)) . The ordering of E’s and Var’s on the right-hand side spells EVVE, whence the name Eve’s law. Eve’s law is also known as the law of total variance or the variance decomposition formula.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

49 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

50 / 130

slide-26
SLIDE 26

Example: Random Sum

A store receives N customers in a day, where N is an r.v. with finite mean and variance. Let Xj be the amount spent by the jth customer at the

  • store. Assume that each Xj has mean µ and variance σ2, and that N and

all the Xj are independent of one another. Find the mean and variance of the random sum X = N

j=1 Xj, which is the store’s total revenue in a day,

in terms of µ, σ2, E(N), and Var(N).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

51 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

52 / 130

slide-27
SLIDE 27

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

53 / 130

Linear Regression

An extremely widely used method for data analysis in statistics is linear

  • regression. In its most basic form, the linear regression model uses a single

explanatory variable X to predict a response variable Y , and it assumes that the conditional expectation of Y is linear in X: E(Y |X) = a + bX. (a) Show that an equivalent way to express this is to write Y = a + bX + ǫ, where ǫ is an r.v. (called the error) with E(ǫ|X) = 0. (b) Solve for the constants a and b in terms of E(X), E(Y ), Cov(X, Y ), and Var(X).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

54 / 130

slide-28
SLIDE 28

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

55 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

56 / 130

slide-29
SLIDE 29

Projection Interpretation

Theorem

For any function h, the r.v. Y − E(Y |X) is uncorrelated with h(X). Equivalently, E((Y − E(Y |X))h(X)) = 0. (This is equivalent since E(Y − E(Y |X)) = 0, by linearity and Adam’s law.)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

57 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

58 / 130

slide-30
SLIDE 30

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

59 / 130

Geometric Perspective

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

60 / 130

slide-31
SLIDE 31

Prediction Perspective

Predict or estimate the future observations or unknown parameters based on data E(Y |X) is our best predictor of Y based on X. Best means it is the function of X with the lowest mean squared error (expected squared difference between Y and prediction of Y ).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

61 / 130

Proof 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

62 / 130

slide-32
SLIDE 32

Proof 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

63 / 130

Proof 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

64 / 130

slide-33
SLIDE 33

Proof 2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

65 / 130

Proof 2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

66 / 130

slide-34
SLIDE 34

Proof 2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

67 / 130

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

68 / 130

slide-35
SLIDE 35

Revisit the Story of Bobo

A single amoeba, Bobo, lives in a pond. After one minute Bobo will either die, split into two amoebas, or stay the same, with equal probability, and in subsequent minutes all living amoebas will behave the same way,

  • independently. What is the probability that the amoeba population will

eventually die out?

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

69 / 130

Branching Process

Very useful model for the growth of populations Galton-Watson process: Sir Francois Galton & Reverend Henry William Watson made important contributions. Various Applications

◮ Extinction of family surnames (original motivation) ◮ The spread of infectious diseases and epidemics (biology and

epidemiology)

◮ The spread of computer software viruses ◮ Rumor(information) spread in social networks Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

70 / 130

slide-36
SLIDE 36

Illustration of A Branching Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

71 / 130

Setting

Offspring distribution (a) = (a0, a1, a2, . . .): distribution of each individual independently produces a random number of children An individual gives birth to k children with probability ak, k ≥ 0 , independently of other individuals. Zn: the size (number of individuals) of the nth generation, n ≥ 0. Z0, Z1, . . . is a branching process.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

72 / 130

slide-37
SLIDE 37

Mean Generation Size

Theorem

Let µ =

  • k=0

k · ak. Suppose Z0 = 1, then the mean of nth generation size is E(Zn) = µn, n ≥ 0.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

73 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

74 / 130

slide-38
SLIDE 38

Three Cases

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

75 / 130

Three Cases

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

76 / 130

slide-39
SLIDE 39

Extinction in the Subcritical Case

Theorem

With probability 1, a subcritical branching process eventually goes extinct.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

77 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

78 / 130

slide-40
SLIDE 40

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

79 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

80 / 130

slide-41
SLIDE 41

Variance of Generation Size

Theorem

Let σ2 denote the variance of the offspring distribution. Then we have Var(Zn) =

  • nσ2

if µ = 1 σ2µn−1

µn−1 µ−1

  • if µ = 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

81 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

82 / 130

slide-42
SLIDE 42

Probability Generation Function (PGF)

Theorem

The PGF for Zn is the n-fold composition of the PGF for offspring distribution.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

83 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

84 / 130

slide-43
SLIDE 43

Extinction Probability

Theorem

Given a branching process, let G be the probability generating function of the offspring distribution. Then, the probability of eventual extinction is the smallest positive root of the equation s = G(s). Further, If µ ≤ 1, that is, in the subcritical and critical cases, the extinction probability is equal to 1.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

85 / 130

Example: Story of Bobo

A single amoeba, Bobo, lives in a pond. After one minute Bobo will either die, split into two amoebas, or stay the same, with equal probability, and in subsequent minutes all living amoebas will behave the same way,

  • independently. What is the probability that the amoeba population will

eventually die out?

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

86 / 130

slide-44
SLIDE 44

Example: First-Success Distribution of Offspring

A branching process has offspring distribution ak = (1 − p)kp, for k = 0, 1, . . .. Find the extinction probability in the supercritical case.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

87 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

88 / 130

slide-45
SLIDE 45

Simulation Results

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

89 / 130

Outline

1

Conditional Expectation Given An Event

2

Conditional Expectation Given An R.V.

3

Properties of Conditional Expectation

4

Application I: Prediction and Estimation

5

Application II: Branching Process

6

Application III: Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

90 / 130

slide-46
SLIDE 46

Poisson Process

Figure : Illustration of a Poisson process and its arrival times {S1, S2, . . . , }, its interarrival times {X1, X2, . . . , }, and its counting process N(t) : t ≥ 0.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

91 / 130

Various Perspectives

The Poisson process can be described in three ways: The interarrival times X1, X2, X3, · · · The arrival times S0 = 0, S1, S2, S3, · · · The arrival counts N(t) in [0, t], t ≥ 0

Important Relationships

Sn =

n

  • j=1

Xj, n ≥ 1 Xn = Sn − Sn−1, n ≥ 1 N(t) = max{n : Sn ≤ t} N(t) ≥ n ⇔ Sn ≤ t

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

92 / 130

slide-47
SLIDE 47

Equivalent Definitions of Poisson Process

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

93 / 130

Poisson Process - Definition 1

Definition

A Poisson process with parameter λ is a counting process (Nt)t≥0 with the following properties:

1 N0 = 0. 2 For all t > 0, Nt has a Poisson distribution with parameter λt. 3 (Stationary increments) For all s, t > 0, Nt+s − Ns has the same

distribution as Nt. That is, P(Nt+s − Ns = k) = P(Nt = k) = e−λt(λt)k k! , for k = 0, 1, ...

4 (Independent increments) For 0 ≤ q < r ≤ s < t, Nt − Ns and

Nr − Nq are independent random variables.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

94 / 130

slide-48
SLIDE 48

Translated Poisson Process

Let (Nt)t≥0 be a Poisson process with parameter λ. For s > 0, let ˜ Nt = Nt+s − Ns, for t ≥ 0. Then we have (˜ Nt)t≥0 is called “Translated Poisson Process”. (˜ Nt)t≥0 is a Poisson process with parameter λ

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

95 / 130

Poisson Process - Definition 2

Definition

Let X1, X2, . . . be a sequence of i.i.d. exponential random variables with parameter λ. For t > 0, let Nt = max{n : X1 + · · · + Xn ≤ t}, with N0 = 0. Then, (Nt)t≥0 defines a Poisson process with parameter λ.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

96 / 130

slide-49
SLIDE 49

Arrival Times & Gamma Distribution

For n = 1, 2, . . . , let Sn be the time of the n-th arrival in a Poisson process with parameter λ. Then, Sn has a gamma distribution with parameters n and λ. The density function of Sn is fSn(t) = λntn−1e−λt (n − 1)! , for t > 0. Mean and variance are E(Sn) = n λ and Var(Sn) = n λ2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

97 / 130

One New Perspective

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

98 / 130

slide-50
SLIDE 50

Another New Perspective

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

99 / 130

From Definition 2 to Definition 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

100 / 130

slide-51
SLIDE 51

From Definition 1 to Definition 2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

101 / 130

From Definition 1 to Definition 2

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

102 / 130

slide-52
SLIDE 52

Arrival Times & Uniform Distribution

Let S1, S2, . . . , be the arrival times of a Poisson process with para- meter λ. Conditional on Nt = n, the joint distribution of (S1, . . . , Sn) is the distribution of the order statistics of n i.i.d. uniform random variables on [0, t]. That is, the joint density function of S1, . . . , Sn is f (s1, . . . , sn) = n! tn , for 0 < s1 < · · · < sn < t. Equivalently, let U1, . . . , Un be an i.i.d. sequence of random variables uniformly distributed on [0, t]. Then, conditional on Nt = n, (S1, . . . , Sn) and (U(1), ..., U(n)) have the same distribution.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

103 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

104 / 130

slide-53
SLIDE 53

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

105 / 130

Example

Concert-goers arrive at a show according to a Poisson process with parameter λ. The band starts playing at time t. The k-th person to arrive in [0, t] waits t − Sk time units for the start of the concert, where Sk is the k-th arrival time. Find the expected total waiting time of concert-goers who arrive before the band starts.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

106 / 130

slide-54
SLIDE 54

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

107 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

108 / 130

slide-55
SLIDE 55

Example

Students enter a campus building according to a Poisson process (Nt)t≥0 with parameter λ. The times spent by each student in the building are i.i.d. random variables with continuous cumulative distribution function F(t). Find the probability mass function of the number of students in the building at time t, assuming there are no students in the building at time 0.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

109 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

110 / 130

slide-56
SLIDE 56

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

111 / 130

Thinned Poisson Process

Let (Nt)t≥0 be a Poisson process with parameter λ. Assume that each arrival, independent of other arrivals, is marked as a type k event with probability pk, for k = 1, . . . , n, where p1 + · · · + pn = 1. Let N(k)

t

be the number of type k events in [0, t]. Then,

  • N(k)

t

  • t≥0 is a Poisson process

with parameter with λpk. Furthermore, the processes

  • N(1)

t

  • t≥0 , . . . ,
  • N(n)

t

  • t≥0

are independent. Each process is called a thinned Poisson process.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

112 / 130

slide-57
SLIDE 57

Superposition Process

Assume that

  • N(1)

t

  • t≥0 , . . . ,
  • N(n)

t

  • t≥0 are n independent Poisson

processes with respective parameters λ1, . . . , λn. Let Nt = N(1)

t

+ · · · + N(n)

t

, for t ≥ 0. Then, (Nt)t≥0 is a Poisson process with parameter λ = λ1 + · · · + λn.

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

113 / 130

Revisited Coupon Collector Problem

Previously we introduce the coupon collector problem: n toy types, collected one by one, sampling with replacement from the set of toy types each time, and all toy types were equally likely to be collected. Now suppose that at each stage, the jth toy type is collected with probability pj, where the pj, j = 1, . . . , n are not necessarily equal. Let N be the number of toys needed until we have a full set. Find E(N).

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

114 / 130

slide-58
SLIDE 58

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

115 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

116 / 130

slide-59
SLIDE 59

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

117 / 130

Birthday Match Problem: Online Version

Assume a random person’s birthday is uniformly distributed on the 365 days of the year. People enter the room one by one. How many people are in the room the first time that two people share the same birthday? Let K be the desired number. Find E(K)

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

118 / 130

slide-60
SLIDE 60

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

119 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

120 / 130

slide-61
SLIDE 61

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

121 / 130

Solution

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

122 / 130

slide-62
SLIDE 62

Feller’s Classical Problem

Buses arrive at a bus stop according to a Poisson process. The time between buses, on average, is 10 minutes. Lisa gets to the bus stop at time t. How long can she expect to wait for a bus?

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

123 / 130

Length-biased Sampling

Theorem

Suppose buses arrive at a bus stop according to a Poisson process Nt with parameter λ. Given a fixed t > 0. The time of the last bus before t is SNt, and the time of the next bus after t is SNt+1. Then we have E(SNt+1 − SNt) = 2 − e−λt λ

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

124 / 130

slide-63
SLIDE 63

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

125 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

126 / 130

slide-64
SLIDE 64

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

127 / 130

Proof

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

128 / 130

slide-65
SLIDE 65

Summary 1

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

129 / 130

References

Chapters 9 & 13 of BH Chapters 4 & 6 of BT

Ziyu Shao (ShanghaiTech) Lecture 8: Conditional Expectation

  • Nov. 16, 2018

130 / 130