12
CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building [email protected] [email protected] 1

CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building [email protected] [email protected]

Embed Size (px)

Citation preview

Page 1: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

1

CSE 531: Performance Analysis of SystemsLecture 2: Probs & Stats review

Anshul Gandhi1307, CS building

[email protected]@stonybrook.edu

Page 2: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

2

Outline

1. Announcements

2. Probability basics Experiments, events, helpful relations

3. Random variables Discrete

Bernoulli, Binomial, Geometric Continuous

Uniform, Exponential

Page 3: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

3

Announcements

• Collaborating on assignments

• Assignment 1 (next week)

Page 4: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

4

Basics• Probability is defined in terms of some experiment.• The set of all outcomes of an experiment is its sample space.• A subset of the sample space is called an event.

Mutually exclusive Partition Independent

• A function defined on the outcomes is a random variable.

• Law of total probability• Conditional probability• Bayes’ theorem

Page 5: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

5

Random variables• Discrete and Continuous

• Discrete Countable possibilities pmf

Page 6: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

6

Discrete RVs• PMF for sample space S

Pr[X = s] = pX(s) = p(s)

CDF: FX(a) = Pr[X ≤ a] =

Inverse CDF: F@X(a) = Pr[X > a] = 1 - FX(a) =

Mean E[X] =

E[X2] =

Var[X] = E[X2] – (E[X])2

Pr[ ]x a

X a

Pr[ ]x a

X a

. ( )s Ss p s

( ) 1s Sp s

2. ( )s Ss p s

Page 7: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

7

Bernoulli(p)• Outcome of a coin toss• p(1) = p• p(0) = 1-p

(find limits of s)

Mean E[X]

E[X2]

Var[X]

( ) 1s Sp s

Page 8: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

8

Binomial(n, p)• Number of 1’s when flipping a Bernoulli coin n times• p(i) = nCi pi (1-p)(n-i)

Mean E[X]

E[X2]

Var[X]

( ) 1s Sp s

Page 9: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

9

Geometric(p)• Number of flips till we get a 1• p(i) = (1-p)(i-1) . p

Mean E[X]

E[X2]

Var[X]

( ) 1s Sp s

Page 10: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

10

Continuous RVs• PDF for sample space S

Pr[a ≤ X ≤ b] =

CDF: FX(a) = Pr[X ≤ a] =

E[Xi] =

Var[X] = E[X2] – (E[X])2

( ) ( )b b

Xa a

f x dx f x dx

( ) 1, ( ) Pr[ ]f x dx f x dx x X x dx

( )a

f x dx

( )a

ix f x dx

( ) ( )ddxf x F x

Page 11: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

11

Uniform(a, b)• f(x) = 1/(b-a) for a < x < b

E[X]

E[X2]

Var[X]

( ) 1f x dx

Page 12: CSE 531: Performance Analysis of Systems Lecture 2: Probs & Stats review Anshul Gandhi 1307, CS building anshul@cs.stonybrook.edu anshul.gandhi@stonybrook.edu

12

Exponential(λ)• f(x) = λ e - λ x, x ≥ 0

E[X]

E[X2]

Var[X]

( ) 1f x dx