65
IERG 3050: Review of Probability and Statistics Week 2 Bolei Zhou Department of Information Engineering

IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

IERG 3050: Review of Probability and Statistics

Week 2

Bolei ZhouDepartment of Information Engineering

Page 2: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Announcement

This Week’s Tutorial (temporarily rescheduled): • Thursday: 15:30 pm – 16:15 pm at SHB 801• Friday: 14:00 pm – 14:45 pm at SHB 801

Course project proposal due: Sept.22, 2019

Page 3: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Motivation• Simulation is more than flowcharts and programming!

• One needs to apply probability and statistics in various stages:

• Model a probabilistic system• Choose the input probability distributions• Generate random numbers from given distributions• Perform statistical analyses of the simulation output data• Validate the simulation models

3

Page 4: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

□ Acknowledgement: Prof. Minghua Chen, Rosana Chan, Prof. Angela Zhang, Prof. Jianwei Huang, and Prof. Pascal Vontobel for contributing to the slides

4

Page 5: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Queueing Systems

• Single-queue-single-server• Multiple-queue-multiple-server

Page 6: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

A Comment on Arrival Processes and Service Times

6

Page 7: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

A Comment on Arrival Processes and Service Times

7

Page 8: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

A Comment on Arrival Processes and Service Times

8

Page 9: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

9

A Comment on Arrival Processes and Service Times

Page 10: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

10

Page 11: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Probability Model

11

Page 12: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Event

12

Page 13: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Probability

13

Page 14: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Conditional Probability

14

Page 15: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Independence

15

Page 16: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Exercises

16

Page 17: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Exercises (Wall street bank interview question)

“Let’s play Russian Roulette. Here’s a gun, a revolver. Here’s the barrel of the gun, six chambers, all empty. Now watch me as I put two bullets into the barrel, into two adjacent chambers. I close the barrel and spin it. I put a gun to your head and pull the trigger. Click. Lucky you! Now I’m going to pull the trigger one more time. Which would you prefer: that I spin the barrel first or that I just pull the trigger?”

Page 18: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

• A variant: How about that the two bullets can be in any positions.

Exercises (Wall street bank interview question)

Page 19: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

IERG 3050: Review of Probability and Statistics

Week 2 Lecture 5

Bolei ZhouDepartment of Information Engineering

Page 20: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

20

Page 21: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Comment for Last Lecture

P(A) = 0.30 + 0.10 + 0.12 = 0.52the conditional probability:P(A|B1) = 1,P(A|B2) = 0.12 ÷ (0.12 + 0.04) = 0.75,and P(A|B3) = 0.

Page 22: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Comment for Last Lecture

“Let’s play Russian Roulette. Here’s a gun, a revolver. Here’s the barrel of the gun, six chambers, all empty. Now watch me as I put two bullets into the barrel, into two adjacent chambers. I close the barrel and spin it. I put a gun to your head and pull the trigger. Click. Lucky you! Now I’m going to pull the trigger one more time. Which would you prefer: that I spin the barrel first or that I just pull the trigger?”

Page 23: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Random Variable

23

Page 24: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Random Variable

24

Page 25: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Discrete Random Variable

25

Page 26: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Continuous Random Variable

26

Page 27: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Continuous Random Variable

27

Page 28: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

28

Page 29: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Cumulative Distribution Function

29

Page 30: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Cumulative Distribution Function

30

Page 31: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

31

Page 32: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Joint PMF and Conditional PMF

32

Page 33: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Joint PDF and Conditional PDF

33

Page 34: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Independence of Random Variables

34

Page 35: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Independence of Random Variables

35

Page 36: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Exercise

36

Page 37: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

37

Page 38: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Mean (Expected Value)

38

Page 39: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Mean (Expected Value)

39

PMF

PDF

Page 40: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Expectation

40

Page 41: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Variance

41

Page 42: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Variance

42

Page 43: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Properties of Expectation

43

Page 44: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Example

• Suppose that two factories supply light bulbs to the market. Factory X's bulbs work for an average of 5000 hours, whereas factory Y's bulbs work for an average of 4000 hours. It is known that factory X supplies 60% of the total bulbs available. What is the expected length of time that a purchased bulb will work for?

• Applying the law of total expectation, we have: E(L) = E(L|X)P(X) + E(L|Y)P(Y) = 5000*0.6 + 4000*0.4 = 4600

Page 45: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Properties of Variance

45

Page 46: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Discrete Random Variables

46

Page 47: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Bernoulli Distribution

Flip a coin, the chance to get a headDiscrete probability distribution: Pr(X=1) = p, Pr(X=0) = 1-p• E(X) = p• Var[X] = p(1-p), why?• E[X2] = Pr(X=1) * 12 + Pr(X=0) * 02 = p• Var[X] = E[X2] – E[X]2=p-p2 = p(1-p)

Page 48: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Binomial Distribution

• Flip a coin n times, numbers of head we can get.

• Relation to Bernoulli distribution?

• Practice: compute the mean and variance of binomial distribution

Page 49: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate
Page 50: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate
Page 51: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Example for binomial distribution

Suppose a biased coin comes up heads with probability 0.3 when tossed. What is the probability of achieving 0, 1,..., 6 heads after six tosses?

Page 52: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Geometric Random Variable

• Flip a coin, until you get a head• Distribution over the number of trials needed to get the first success

in repeated Bernoulli trials.

Page 53: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Geometric Random Variable

• Memoryless property: P(X > x+y | X > x) = P(X > x)• Example: Pr(X > 40 | X > 30) = Pr(X>10)• Proof:

Page 54: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Geometric Random Variable

54

Page 55: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Geometric Random Variable

• Mean of the geometric random variable E(X) = 1/p

Page 56: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Coupon collector’s problem

• How many snacks you have to buy to collect all n different types of coupon?

ti has geometric distribution with expectation 1/pi

Page 57: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Exponential Random Variable

57

Page 58: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Gaussian Random Variable

58

Page 59: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Outline

• A comment on Arrival Processes and Service Times• Probability Models, Conditioning, and Independence• Random Variables: Discrete vs. Continuous• Cumulative Distribution Function• Joint Probability Distribution• Mean and Variance• Covariance and Correlation

• Reading: Chapter 4

59

Page 60: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Covariance

60

Page 61: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Correlation

61

Page 62: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Summary of Concepts and Principles

62

Page 63: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Course Project

Group-forming and proposal due on Sept 22• Reply to a dedicated thread created by Yinghao (TA)

with your project title and group member in the reply, and project proposal attached

• Sample proposal on piazza• Open-ended: as long as you use simulation and

statistical analysis to analyze/design (abstract versions of) real-world systems, it will be fine

63

Page 64: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Course Project Steps (Suggestions only)

• Collection of data;• Modelling and validation of random variables;• Modelling of the system;• Implementing a simulation program of the system model;• Reporting the results;• Stating some conclusions, comments, and/or suggestions for

improvement.

64

Page 65: IERG 3050: Review of Probability and Statistics Week 2ierg3050/Lectures/week2-lecture.pdf · •Model a probabilistic system •Choose the input probability distributions •Generate

Thank you!