basic probability and stats review random variables discrete probability distributions expected...

11
Basic Probability and Stats Review Random variables Discrete probability distributions Expected value of a discrete random variable Continuous Distributions Working with distributions in Excel

Post on 20-Dec-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Basic Probability and Stats Review

Random variables Discrete probability distributions Expected value of a discrete random variable Continuous Distributions Working with distributions in Excel

Page 2: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Random variables (RV) and probability distributions

RV is a variable whose value depends on the outcome of an uncertain event(s)

Low bid by competing firms, project completion date Demand for some product or service next year # of patients requiring open heart surgery next month at Hospital H Cost of Drug X in December, 2004

Probability of various outcomes determined by probability distribution associated with the RV Probability distributions are the “shapes of RV’s” As modelers, we select appropriate distributions

Probability distributions mathematical functions Assign numeric probabilities to uncertain events modeled by the distribution

See “Distributions, Simulation and Excel Functions” handout that Prof. Doane created and that I’ve posted on Web.

Page 3: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Two Types of Variables

Discrete Distributions

• Integer, countable X

• example: # of warranty claims in a day

• P(X) is the probability at each point

• P(X) may be summed over X values

Continuous Distributions

• X defined over an interval

• example: Length of stay for open heart surgery patients

• Points have no area

• Calculus gives area under curve

Page 4: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Discrete RVs and Probability Distributions

Countable # of outcome values

Each possible outcome has an associated probability

Discrete Probability Distribution of Demand

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

100 150 200 250 300

Demand

Pro

bab

ilit

y

Expected Demand Total Probability

A few discrete distributions Empirical Binomial – BINOMDIST() Poisson – POISSON()

1

[ ] [ ]n

i ii

E X x P X x

Expected Value of Discrete RV

DistributionReview.xls

x Prob[X=x] Prob[X<=x]

Demand ProbabilityCumulative Probability

100 0.30 0.30150 0.20 0.50200 0.30 0.80250 0.15 0.95

300 0.05 1.00

172.5 1.00

Page 5: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Continuous RVs and Probability Distributions

Infinite # of outcome values Has a probability distribution

function (pdf), f(x), which you can loosely think of as P[X=b].

We calculate probabilities over intervals using the cumulative distribution function (cdf), F(x), which is P[X<=b]

Area under the f(x) curve from –infinity to b

[ ] ( )b

P X b f x dx

[ ] ( )E X xf x dx

Uniform f(x) Exponential f(x) Normal f(x)

Page 6: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

P.D.F. vs. CumulativeProbability Density Function

• X axis shows values of X

• Y axis shows probability

• P(X) = 1 if discrete

• f(x) = 1 if continuous

• Histogram is pdf for data

Cumulative Distribution Function

• X axis shows values of X

• Y axis shows cumulative probability

• 0 F(X) 1 and is non-decreasing

Page 7: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Excel Add-In, Part of Palisade Decision Tools Suite “Live” distribution viewing, Huge number of distributions Online Help has background info on distributions Start | Palisade Decision Tools | RiskView 4.5 Can also launch from within Excel from the Palisade Decision

Tools toolbar (which is visible if any of the Palisade tools are running, e.g. @Risk)

RiskView

Page 8: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

A few useful distributionsD istribution Illustration C haracteristics N orm al

Th e fam iliar “bell -sh aped curve.” S ym m etric, w ith a peak in th e m iddle and gradually taperin g ta ils. Pro: Fam iliar, well -kn own . C on: E xtrem e outcom es possible.

T run cated n orm al

Sam e as n orm al but w ith lim its to preven t ex trem e cases from ar isin g. Pro: N o wild outcom es. C on: M ore com plica ted.

Trian gular

Has a cen tral peak an d clear ly -defin ed end poin ts (lowest, m ost likely, h igh est). Can be skew ed. Pro: Easy to un derstand . C on: N o ex trem es can occur .

G en era l R e v e n u e f r o m A s s e t S a le

0 .0 0

0 .1 0

0 .2 0

0 .3 0

0 .4 0

5 0 1 0 0 2 0 0 5 0 0 1 0 0 0

Re v e n u e

Pro

ba

bil

ity

D efin e an y k categories an d m ake sure th e probabilities sum to 1 . Pro: Easy to un derstand . C on: N eed to create categories.

Page 9: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

The Normal Distribution Two parameters: Mean, standard deviation Symmetric Standard normal distribution has mean=0, std dev=1 Normally distributed data with any mean and standard

deviation can be converted to a N(0,1) by standardizing

X~N(,) Z~N(0,1)XZ

Excel has a number of functions related to the normal distribution: NORMDIST(), NORMINV()

NORMSDIST(), NORMSINV()Let’s review handout “Excel Functions for Working with Normal

Distributions” and do the Continuous tab in DistributionReview.xls

Page 10: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Distribution Review Download DistributionReview.xls Let’s answer questions on sheet Discrete

We’ll do Continuous sheet momentarily

Excel has many probability and statistical related functions

Remember, probability distributions are a type of model for some uncertain quantity

Think of histograms as empirical probability distribution functions

Page 11: Basic Probability and Stats Review  Random variables  Discrete probability distributions  Expected value of a discrete random variable  Continuous

Descriptive Statistics in Excel Data Analysis Tool-Pak AVERAGE(),

STDEV(), MEDIAN() FREQUENCY() PERCENTILE() RANK(),

PERCENTRANK() MIN(), MAX()

StatReview.xls

2 ways to create histograms Data Analysis Tool-Pak

Default bins User specified bins

FREQUENCY() array function