520 likes | 768 Views
Class 6 การแจกแจงความน่าจะเป็น. บธบ 151 สถิติและระเบียบวิจัยธุรกิจ ภาคเรียนที่ 1 ประจำปีการศึกษา 2556. Learning Objectives. Understand the concept of random variables Understand the concept of probability distribution Calculate the expected value and variance
E N D
Class 6การแจกแจงความน่าจะเป็น บธบ 151 สถิติและระเบียบวิจัยธุรกิจ ภาคเรียนที่ 1 ประจำปีการศึกษา 2556
Learning Objectives • Understand the concept of random variables • Understand the concept of probability distribution • Calculate the expected value and variance • Calculate the probability from a given situation
Random Variables • Capital X denotes a random variable • Based on the distribution, there are different probabilities for each value that X could take on • We’re familiar with the normal distribution already, but we’ll learn about distributions with other “shapes” later
Discrete vs. Continous • Discrete RV: X can only be from a finite set of values (usually integers or only some integers) • Ex: The number of customers that walks in • Probability Mass Function (pmf) • Continuous RV: X can be a value anywhere in a range of numbers • Ex: The exact time a customer walks in • Probability Density Function (pdf)
Probability functions • A probability function maps the possible values of x against their respective probabilities of occurrence, p(x) • p(x) is a number from 0 to 1.0. • The area under a probability function is always 1.
p(x) 1/6 x 1 2 3 4 5 6 Discrete example: roll of a die
x p(x) 1 p(x=1)=1/6 2 p(x=2)=1/6 3 p(x=3)=1/6 4 p(x=4)=1/6 5 p(x=5)=1/6 6 p(x=6)=1/6 1.0 Probability mass function (pmf)
P(x) 1.0 5/6 2/3 1/2 1/3 1/6 x 1 2 3 4 5 6 Cumulative distribution function (CDF)
x P(x≤A) 1 P(x≤1)=1/6 2 P(x≤2)=2/6 3 P(x≤3)=3/6 4 P(x≤4)=4/6 5 P(x≤5)=5/6 6 P(x≤6)=6/6 Cumulative distribution function
Examples 1. What’s the probability that you roll a 3 or less? P(x≤3)=1/2 2. What’s the probability that you roll a 5 or higher? P(x≥5) = 1 – P(x≤4) = 1-2/3 = 1/3
x 10 11 12 13 14 P(x) .4 .2 .2 .1 .1 Practice Problem: • The number of ships to arrive at a harbor on any given day is a random variable represented by x. The probability distribution for x is: Find the probability that on a given day: a.exactly 14 ships arrive b.At least 12 ships arrive c.At most 11 ships arrive
Practice Problem: You are lecturing to a group of 1000 students. You ask them to each randomly pick an integer between 1 and 10. Assuming, their picks are truly random: • What’s your best guess for how many students picked the number 9? • What percentage of the students would you expect picked a number less than or equal to 6?
Important discrete distributions • Binomial • Yes/no outcomes (dead/alive, treated/untreated, smoker/non-smoker, sick/well, etc.) • Poisson • Counts (e.g., how many cases of disease in a given area)
Continuous case • The probability function that accompanies a continuous random variable is a continuous mathematical function that integrates to 1. • The probabilities associated with continuous functions are just areas under the curve (integrals!). • Probabilities are given for a range of values, rather than a particular value
Expected value, or mean • If we understand the underlying probability function of a certain phenomenon, then we can make informed decisions based on how we expect x to behave on-average over the long-run…(so called “frequentist” theory of probability). • Expected value is just the weighted average or mean (µ) of random variable x. Imagine placing the masses p(x) at the points X on a beam; the balance point of the beam is the expected value of x.
x 10 11 12 13 14 P(x) .4 .2 .2 .1 .1 Example: expected value • Recall the following probability distribution of ship arrivals:
Expected value, formally Discrete case: Continuous case:
Example of Expected value • Take the show “Deal or No Deal” • Let’s say you are down to two cases left. • If your answer is wrong, you’ll get $1 • If your answer is correct, you’ll get $400,000 • If you stop the game now, you’ll get $200,000. • So, Deal or No Deal?
x$ x$ p(x) p(x) +1 +$200,000 .50 1.0 +$400,000 .50 Deal or No Deal… • This could really be represented as a probability distribution and a non-random variable:
x$ x$ p(x) p(x) +1 +$200,000 .50 1.0 +$400,000 .50 Expected value doesn’t help…
How to decide? • Variance! • If you take the deal, the variance/standard deviation is 0. • If you don’t take the deal, what is average deviation from the mean? • What’s your gut guess?
Variance, formally Discrete case: Continuous case:
Variance: Deal or No Deal Now you examine your personal risk tolerance…
The Normal Distribution… • The normal distribution is the most important of all probability distributions. The probability density function of a normal random variable is given by: • It looks like this: • Bell shaped, • Symmetrical around the mean …
The Normal Distribution… Important things to note: The normal distribution is fully defined by two parameters: its standard deviation andmean The normal distribution is bell shaped and symmetrical about the mean Unlike the range of the uniform distribution (a ≤ x ≤ b) Normal distributions range from minus infinity to plus infinity
0 1 1 Standard Normal Distribution… • A normal distribution whose mean is zero and standard deviation is one is called the standard normal distribution. • As we shall see shortly, any normal distribution can be converted to a standard normal distribution with simple algebra. This makes calculations much easier.
Normal Distribution… • The normal distribution is described by two parameters: • its mean and its standard deviation . Increasing the mean shifts the curve to the right…
Normal Distribution… • The normal distribution is described by two parameters: • its mean and its standard deviation . Increasing the standard deviation “flattens” the curve…
Calculating Normal Probabilities… • Example: The time required to build a computer is normally distributed with a mean of 50 minutes and a standard deviation of 10 minutes: • What is the probability that a computer is assembled in a time between 45 and 60 minutes? • Algebraically speaking, what is P(45 < X < 60) ? 0
Calculating Normal Probabilities… …mean of 50 minutes and a standard deviation of 10 minutes… • P(45 < X < 60) ? 0
Calculating Normal Probabilities… • P(–.5 < Z < 1) looks like this: • The probability is the area • under the curve… • We will add up the • two sections: • P(–.5 < Z < 0) and • P(0 < Z < 1) 0 –.5 … 1
Calculating Normal Probabilities… How to use Table … [other forms of normal tables exist] This table gives probabilities P(0 < Z < z) First column = integer + first decimal Top row = second decimal place P(0 < Z < 0.5) P(0 < Z < 1) P(–.5 < Z < 1) = .1915 + .3414 = .5328 The probability time is between 45 and 60 minutes = .5328
Using the Normal Table (Table)… • What is P(Z > 1.6) ? P(0 < Z < 1.6) = .4452 z 0 1.6 P(Z > 1.6) = .5 – P(0 < Z < 1.6) = .5 – .4452 = .0548
Using the Normal Table (Table)… • What is P(Z < -2.23) ? P(0 < Z < 2.23) P(Z < -2.23) P(Z > 2.23) z 0 -2.23 2.23 P(Z < -2.23) = P(Z > 2.23) = .5 – P(0 < Z < 2.23) = .0129
Using the Normal Table (Table)… • What is P(Z < 1.52) ? P(0 < Z < 1.52) P(Z < 0) = .5 z 0 1.52 P(Z < 1.52) = .5 + P(0 < Z < 1.52) = .5 + .4357 = .9357
Using the Normal Table (Table)… What is P(0.9 < Z < 1.9) ? P(0 < Z < 0.9) P(0.9 < Z < 1.9) z 0 0.9 1.9 P(0.9 < Z < 1.9) = P(0 < Z < 1.9) – P(0 < Z < 0.9) =.4713 – .3159 = .1554
The return on investment is normally distributed with a mean of 10% and a standard deviation of 5%. What is the probability of losing money? We want to determine P(X < 0). Thus, Example 8.2
Finding Values of ZA… • Often we’re asked to find some value of Z for a given probability, i.e. given an area (A) under the curve, what is the corresponding value of z (zA) on the horizontal axis that gives us this area? That is: • P(Z > zA) = A
Finding Values of Z… • What value of z corresponds to an area under the curve of 2.5%? That is, what is z.025 ? Area = .50 Area = .025 Area = .50–.025 = .4750 If you do a “reverse look-up” on Table for .4750,you will get the corresponding zA = 1.96 Since P(z > 1.96) = .025, we say: z.025 = 1.96
Finding Values of Z… Other Z values are • Z.05 = 1.645 • Z.01 = 2.33
Using the values of Z • Because z.025 = 1.96 and - z.025= -1.96, it follows that we can state P(-1.96 < Z < 1.96) = .95 • The old Empirical Rule stated about 95% within + 2σ P(-2 < Z < 2) = .95 • From now on we will use the 1.96 number for this statement unless you are just talking in general terms about how much of a population in with + 2σ • Similarly P(-1.645 < Z < 1.645) = .90
Exponential Distribution…[Not on test] • Another important continuous distribution is the exponential distribution which has this probability density function: • Note that x ≥ 0. Time (for example) is a non-negative quantity; the exponential distribution is often used for time related phenomena such as the length of time between phone calls or between parts arriving at an assembly station. Note also that the mean and standard deviation are equal to each other and to the inverse of the parameter of the distribution (lambda )
Exponential Distribution…[Not on test] • The exponential distribution depends upon the value of • Smaller values of “flatten” the curve: (E.g. exponential distributions for = .5, 1, 2)
Other Continuous Distributions… • Three other important continuous distributions which will be used extensively in later sections are introduced here: • Student t Distribution, Looks like the standard normal distribution (Z) after someone sat on it • Chi-Squared Distribution, • F Distribution.
Student t Distribution…[1 parameter] • In much the same way that and define the normal distribution [2 parameters], , the degrees of freedom, defines the Student [will use df] • t Distribution: • As the number of degrees of freedom increases, the t distribution approaches the standard normal distribution.
Using the t table (Table 4) for values… • For example, if we want the value of t with 10 degrees of freedom such that the area under the Student t curve is .05: Area under the curve value (t) : COLUMN t.05,10 t.05,10=1.812 Degrees of Freedom : ROW
Chi-Squared Distribution…[Not on test] • The chi-squared density function is given by: • As before, the parameter is the number of degrees of freedom.
F Distribution…[Not on test] • The F density function is given by: • F > 0. Two parameters define this distribution, and like we’ve already seen these are again degrees of freedom. • is the “numerator” degrees of freedom and • is the “denominator” degrees of freedom.
Problems: Standard Normal “Z” • If the random variable Z has a standard normal distribution, calculate the following probabilities. • P(Z > 1.7) = • P(Z < 1.7) = • P(Z > -1.7) = • P(Z < -1.7) = • P(-1.7 < Z < 1.7)
Problems: Normal Distribution • If the random variable X has a normal distribution with • mean 40 and std. dev. 5, calculate the following • probabilities. • P(X > 43) = • P(X < 38) = • P(X = 40) = • P(X > 23) =