applied business forecasting and regression analysis review lecture 2 randomness and probability
TRANSCRIPT
Applied Business Forecasting and Regression Analysis
Review lecture 2
Randomness and Probability
The Idea of Probability Toss a coin, or choose a SRS. The result can not
be predicted in advance, because the result will vary when you toss the coin or choose the sample repeatedly.
But there is still a regular pattern in the results, a pattern that emerges only after many repetitions.
Chance behavior is unpredictable in the short run but has a regular and predictable pattern in the long run.
This fact is the basis for the idea of probability.
The Idea of Probability The proportion of tosses
of a coin that give a head changes as we make more tosses.
Eventually , however, the proportion approaches 0.5, the probability of a head.
This figure shows the results of two trials of 5000 tosses.
Randomness and Probability We call a phenomenon random if individual
outcomes are uncertain but there is nonetheless a regular distribution of outcomes in a large number of repetition.
The probability of an outcome of a random phenomenon is the proportion of times the outcome would occur in a very long repetitions.
Probability Models A probability model is a mathematical description
of a random phenomenon consisting of two parts: A sample space S A way of assigning probabilities to events.
The sample space of a random phenomenon is the set of all possible outcomes. S is used to denote sample space.
An event is an outcome or a set of outcomes of a random phenomenon. An event is a subset of the sample space.
Example, Rolling Dice There are 36 possible
outcomes when we roll two dice and record the up-faces in order(first die, second die).
They make up the sample space S.
Probability Rules1. The probability p(A) of any event A satisfies
2. If S is the sample space in a probability model, then p(S) =1.
3. The probability that an event A does not occur is p( A does not occur) = 1- P(A)
4. Two event A and B are disjoint if they have no outcomes in common and so can never occur simultaneously.
If A and B are disjoint,P(A or B) = P(A) + P(B)
1)(0 Ap
Venn Diagram Venn diagram
showing disjoint events A and B
)()()(
)()()or(
BPAPBAP
BPAPBAP
Venn Diagram Venn diagram
showing events A and B that are not disjoint.
The event {A and B} consists of outcomes common to A and B.
)()()()(
)and()()()or(
BAPBPAPBAP
BAPBPAPBAP
Example Recall the 36 possible outcomes of rolling
two dice. What probabilities shall we assign to these outcomes?
What is the probability of rolling a 5? What is the probability of rolling a 7? What is the probability of rolling a seven or
eleven?
Assigning Probabilities: Finite Number of Outcomes
Assign probabilities to each individual outcome. These probabilities must be numbers between 0
and 1. They must have sum 1.
The probability of any event is the sum of the probabilities of the outcomes making up the event.
Probability Histograms We can use histograms to display probability
distributions as well as distribution of data. In a probability histogram the height of each bar
shows the probability of the outcome at its base Since the heights are probabilities, they add to 1 As usual the bars in a histogram have the same
width, therefore, the areas also display the assignment of probability outcomes.
Think of these histograms as idealized pictures of the results of very many trials.
Example: four coin tosses Toss a balanced coin four times; the discrete
random variable X counts the number of heads. How shall we find the probability distribution of X?
The outcome of four tosses is a sequence of heads and tails such as HTTH.
There are 16 possible outcomes. The following figure lists the outcomes along with
the value of X for each outcome.
Example: four coin tosses Possible outcomes in four tosses of a coin. X is the number of heads.
Example: four coin tosses The probability of each value of X can be
found using the previous figure as follows:
0625.16
1)4(
25.16
4)3(
375.16
6)2(
25.16
4)1(
0625.16
1)0(
XP
XP
Xp
Xp
Xp
Example: four coin tosses These probabilities have sum=1, so this is a
legitimate probability distribution. In the table form, the distribution is
Number of heads X 0 1 2 3 4Probability .0625 .25 .375 .25 .0625
The probability of tossing at least two heads is:
The probability of at least one head is:
Example: four coin tosses Probability histogram
for the number of heads in four tosses of a coin
Assigning Probabilities: Intervals of Outcomes
Suppose you are asked to select a number between 0 and 1 at random. What is the sample space?
The sample space is: S = { all numbers between 0 and 1}
For example: 0.2, 0.27, .00387, etc
Call the outcome of this example (the number you select) Y for short.
How can we assign probabilities to such events as p(.3 y .7)?
Assigning Probabilities: Intervals of Outcomes
We need a new way of assigning probabilities to events - as areas under a density curve.
Recall we first introduced density curves as models for data in previous lectures.
A density curve has area exactly 1 underneath it, corresponding to total probability 1.
Example Probability as area
under a density curve These uniform density
curves spread probability evenly between 0 and 1.
Example Probability as area
under a density curve These uniform density
curves spread probability evenly between 0 and 1.
Normal Probability Models Any density curve can be used to assign
probabilities. The density curves that are most familiar to
us are the normal curves introduced in the previous lectures.
Normal distributions are probability models.
Example The weights of all 9-ounce bags of a particular
brand of potato chip, follow the normal distribution with mean = 9.12 ounces and standard deviation = 0.15 ounces, N(9.12, 0.15).
Let’s select one 9-ounce bag at random and call its weight W.
What is the probability that it has weights between 9.33 and 9.45 ounces?
Example The probability in the
example as an area under the standard normal curve.
Random Variables Not all sample spaces are made up of numbers. When we toss a coin four times, we can record the
outcome as a string of heads and tails, such as HTTH. However we are most often interested in numerical
outcomes such as the count of heads in the four tosses. It is convenient to use the following shorthand notation
Let x be the number of heads. If our outcome is HTTH, then X = 2, if the next
outcome is TTTH, the value of X changes to 1.
Random Variables The possible values of X are 0, 1, 2, 3, 4. Tossing a coin four times will give X one of
these possible values. We call X a random Variable because its
values vary when the coin tossing is repeated.
The Four coin tosses example used this shorthand notation.
Random Variables In the potato chip example, we let W stand
for the weight of a randomly selected 9-ounce bag of potato chips.
We know that W would take a different value if we took another random sample.
Because its value changes from one sample to another, W is also a random variable.
Random Variables A random Variable is a variable whose value is a
numerical outcome of a random phenomenon. We usually denote random variables by capital
letters, such as X, Y. The random variable of greatest interest to us are
outcomes such as the mean of a random sample, for which we keep the familiar notation.
X
Random Variables There are two types of random variables
Discrete Continuous
A discrete random variable has finitely many possible values. Random digit example
A continuous random variable takes all values in some interval of numbers. Random numbers between 0 and 1 example.
Probability Distribution The starting point for studying any random
variable is its probability distribution, which is just the probability model for the outcomes.
The probability distribution of a random variable X tells us what values X can take and how to assign probabilities to those values.
Since the nature of sample spaces for discrete and continuous random variables are different, we describe probability distributions for the two types of random variables separately.
Discrete Probability Distributions The probability distribution of a discrete random
variable X lists the possible values of X and their probabilities:
Value of X x1 x2 x3 … xk
Probability p1 p2 p3 … pk
The probabilities pi must satisfy two requirements. Every probabilities pi is a number between 0 and 1. The sum of the probabilities is exactly 1
To find the probability of any event, add the probabilities pi of the individual values xi that makes up the event.
Example Buyers of a laptop computer model may choose to
purchase either 10 GB, 20 GB, 30 GB or 40 GB internal hard drive. Choose customers from the last 60 days at random to ask what influenced their choice of computer. To “choose at random” means to give every customer of the last 60 days the same chance to be chosen. The size of the internal hard drive chosen by a randomly selected customer is a random variable X.
Example The value of X changes when we repeatedly
choose customers at random, but it is always one of 10, 20, 30, or 40 GB. The probability distribution of X is
Hard drive X 10 20 30 40
probability .50 .25 .15 .10
The probability that a randomly selected customer chose at least a 30 GB hard drive is:
Example We can use a probability histogram to display a discrete
distribution. The following probability histogram pictures this
distribution.
Continuous Probability Distribution A continuous random variable like uniform random
number Y between 0 and 1 or the normal package weight W of potato chips has an infinite number of possible values.
Continuous probability distribution therefore assign probabilities directly to events as area under a density curve.
The probability distribution of a continuous random variable X is described by a density curve.
The probability of any event is the area under the density curve and above the values of X that make up the event.
Continuous Probability Distribution
The probability distribution for a continuous random variable assigns probabilities to intervals of outcomes rather than to individual outcomes.
All continuous probabilities assign probability 0 to every individual outcome.
Example The actual tread life of a 40,000-mile automobile
tire has a Normal probability distribution with = 50,000 and = 5500 miles. We say X has a N(50000, 5500) distribution. The probability that a randomly selected tire has a tread life less than 40,000 mile
0344.
)82.1(
)5500
5000040000
5500
50000()40000(
ZP
xpXp
Example The normal distribution
with = 50,000 and = 5500.
The shaded area is P(X < 40000).
The Mean of a Random Variable We can speak of the mean winning in a game of
chance or the standard deviation of randomly varying number of calls a travel agency receives in an hour.
The mean of a set of observation is their ordinary average.
The mean of a random variable X is also the average of the possible values of X, but in this case not all outcomes need to be equally likely.
X
Mean of a Discrete Random Variable
Suppose that X is a discrete random variable whose distribution is
Value of X x1 x2 x3 … xk
Probability p1 p2 p3 … pk
To find the mean of X, multiply each possible value by its probability, then add all the products:
k
iii
kkx
px
pxpxpxpx
1
332211
Hard-Drive Example The following table gives the distribution of
customer choices of hard-drive size for a laptop computer model. Find the mean of this probability distribution.
Hard drive X 10 20 30 40
probability .50 .25 .15 .10
5.1810.4015.3025.2050.10 x
Variance of a Discrete Random Variable Suppose that X is a discrete random variable
whose distribution isValue of X x1 x2 x3 … xk
Probability p1 p2 p3 … pk
and that is the mean of X. The variance of X
The standard deviation X of X is the square root of the variance.
k
iii
kXkXXXX
px
pxpxpxpx
1
2
23
232
221
21
2
)(
)()()()(
Hard-Drive Example The following table gives the distribution of
customer choices of hard-drive size for a laptop computer model. Find the standard deviation of this probability distribution. Recall µx =18.5.
Hard drive X 10 20 30 40
probability .50 .25 .15 .10
14.1075.102
75.102)10(.)5.1840()15(.)5.1830()25(.)5.1820()5(.)5.1810( 22222
x
x
Rules for the Mean Rule 1: If X is a random variable and a and b are
fixed numbers, then
Rule 2: If X and Y are random variables, then
This is the addition rule for means
xbXa ba
YXYX
Example: Portfolio Analysis The past behavior of
two securities in Sadie’s portfolio is pictured in this figure, which plots the annual returns on treasury bills and common stocks for years 1950 to 2000.
Example: Portfolio Analysis We have calculated the mean returns for these data
set. X = annual return on T-bills Y = annual return on stocks
Sadie invests 20% in T-bills, and 80% in common stocks. Find the mean expected return on her portfolio.
%2.5X%3.13Y
%68.113.138.2.52.
8.2.
8.2.
YXR
YXR
Rules for the Variance Rule 1: If X is a random Variable and a and b are
fixed numbers, then
Rule 2: If X and Y are independent random Variables, then
This is the addition rule for variances of the independent random variables.
222XbXa b
222
222
YXYX
YXYX
Rules for the Variance Rule3: If X and Y have correlation , then
This is the general addition rule for variance of random variables.
YXYXYX 2222
YXYXYX 2222
Example: Portfolio Analysis Based on annual returns between 1950 and 2000,
we have X = annual return on T-bills x = 5.2% X = 2.9
Y = annual return on stocks Y = 13.3% Y = 17% Correlation between x and Y: = - 0.1
For the return R on the Sadie’s portfolio of 20% T-bill and 80% stocks,
%68.113.138.2.52.
8.2.
8.2.
YXR
YXR
Example: Portfolio Analysis To find the variance of the portfolio return, combine Rules
1 and 3.
The portfolio has a smaller mean return than all-stock portfolio, but it is also less volatile.
%55.13719.183
719.183
)178)(.9.22)(.1.0(2)17()8(.)9.2()2(.
)8)(.2(.2)8(.)2(.
2
2222
2222
8.2.28.
22.
2
R
YXYX
YXYXR
Mean of a Continuous Random Variable The probability distribution of a continuous
random variable X is described by a density curve. Recall that the mean of the distribution is the point
at which the area under the density curve would balance if it were made out of solid material.
The mean lies at the center of symmetric density curves such as the Normal curve.
Exact calculation of the mean of a distribution with a skewed density curve requires advanced mathematics.
Mean of a Continuous Random Variable
The idea that the mean is the balance point of the distribution applies to discrete random variables as well, but in the discrete case we have a formula that gives us the numerical value of .
Mean and variance rules holds for mean and variance of both discrete and continuous random variables