﻿ •Business Analytics •Chapter 7 •Random variables and di-澳洲代写,悉尼代写,堪培拉代写,墨尔本代写

# ?Business Analytics ?Chapter 7 ?Random variables and di

•Chapter 7
•Random variables and discrete probability distributions
•Chapter outline
7.1   Random variables and probability distributions
7.2   Discrete probability distributions
7.3   Expected value and variance
7.4   Bivariate distributions
7.5   Applications in finance: portfolio diversification and asset allocation
7.6   Binomial distribution
•Learning objectives
Lecture 6A
LO1   Explain the importance of probability distributions
LO2   Discuss the concept of a random variable and its probability distribution
LO3   Compute the mean and standard deviation of a discrete probability distribution, and apply the laws of expected value and variance
LO4   Explain the bivariate distribution and compute joint probabilities, covariances and correlations
Lecture 6B
LO5   Understand the Bernoulli trial and binomial distribution, and calculate the mean and the variance
LO6   Recognise when it is appropriate to use a binomial distribution, and understand how to use the table of binomial probabilities

•7.1 Random Variables and Probability Distributions
A random variable is a function or a rule that assigns a numerical value to each outcome of an experiment.
Alternatively, the value of a random variable is a numerical event.

There are two types of random variables:
•discrete random variables
•continuous random variables
•Two Types of Random Variables…
Discrete random variable
One that takes on a countable number of values
E.g. sum of values on the roll of two dice: 2, 3,…, 12.

Continuous random variable
One whose values are not discrete, not countable
E.g. time (30 mins, …, 30.01 mins, …, 30.02 mins, …)

Analogy:
Integers are discrete, while real numbers are continuous.
•Discrete and Continuous Random Variables
A random variable is discrete if it can assume only a countable number of values.
A random variable is continuous if it can assume an uncountable number of values.
•Probability Distributions…
A probability distribution is a table, formula, or graph that describes the values of a random variable and the probability associated with these values.

Since we’re describing a random variable (which can be discrete or continuous) we have two types of probability distributions:

•discrete probability distributions
•this chapter
•We covered the relative frequency distribution approach last week
•continuous probability distributions (Chapter 8).
•Probability Notation…
An upper-case letter will represent the name of the random variable, usually X.

Its lower-case counterpart will represent the value of the random variable.

The probability that the random variable X will equal x is:
P(X = x), or more simply p(x)

•7.2  Discrete Probability Distributions
A table, formula or graph that lists all possible values a discrete random variable can assume, together with their associated probabilities, is called a discrete probability distribution.
To calculate P(X = x), the probability that the random variable X assumes the value x, add the probabilities of all the simple events for which X is equal to x.
•Example 1
The number of cars a dealer is selling daily was recorded over the last 200 days. The data are summarised as follows:

a.Estimate the probability distribution.
b.State the probability of selling more than 2 cars a day.

Solution
a.From the table of frequencies we can calculate the relative frequency, which becomes our estimated probability distribution.

b.  The probability of selling more than 2 cars a day is
P(X>2) = P(X=3) +  P(X=4) = 0.25 + 0.20 = 0.45.

•7.3 Expected Value and Variance
The discrete probability distribution represents a population.
In Example 1, the population of number of cars sold per day

Since we have populations, we can describe them by computing various parameters.
E.g. the population mean and population variance.
Expected value of X = E(X)= Population mean of X = m

The expected value of a random variable X is the weighted average of the possible values it can assume, where the weights are the corresponding probabilities of each xi.
•Variance
The population variance is calculated in a similar manner.
The variance is the weighted average of the squared deviations of the values of X from their mean m, where the weights are the corresponding probabilities of each xi.
Let X be a discrete random variable with possible values xi that occur with probabilities p(xi), and let the mean E(xi) = m. The variance of X is defined to be
•Standard Deviation
•Example 2
The total number of cars to be sold next week is described by the following probability distribution (derived in example 1)
Determine the expected value and standard deviation of X, the number of cars sold.
•Example 2- Solution
•7.4  Bivariate Distributions
The bivariate (or joint) distribution is used when  the relationship between two random variables is studied.
The joint probability that X assumes the value x, and Y assumes the value y is denoted
p(x,y) = P(X=x and Y = y)
The joint probability function satisfies the following conditions:

•Example 3
Xavier and Yvette are two real estate agents.  Let X and Y denote the number of houses that Xavier and Yvette, respectively, will sell in a month. An analysis of their past monthly performances has the following joint probabilities.
The bivariate probability distribution of (x,y)
(recall a similar joint probability distribution example from last week)
•Marginal Probabilities…
As before, we can calculate the marginal probabilities by summing across rows and down columns to determine the probabilities of X and Y individually:
•Describing the Bivariate Distribution…
We can describe the mean, variance, and standard deviation of each variable in a bivariate distribution by working with the marginal probabilities…
To describe the relationship between the two variables we compute the covariance and the coefficient of correlation.

Covariance:

COV(X,Y) = S S(X – mx)(Y- my)p(x,y)

Coefficient of correlation

where mX = E(X), mY = E(Y), sX2 = Var(X) and sY2 = Var(Y).
•Example 4…
•Conditional Probability
•Example 5…
•Conditions for Independence
Recall: Two random variables are said to be independent when
This leads to the following relationship for independent variables
•Example 5…
P(X=0|Y=1)= 0.7
But P(X=0)=0.4

The condition for independence is not satisfied.

The variables X and Y are not independent.
•Sum of Two Variables

The probability distribution of X + Y is determined by
•Determining all the possible values that X+Y can assume.
•For every possible value C of X + Y, adding the probabilities of all the combinations of X and Y for which X + Y = C.
•Example 6…

Find the probability distribution of the total number of houses sold per week by Xavier and Yvette.

Solution
•X + Y is the total number of houses sold.
•X + Y can have the values 0, 1, 2, 3, 4.
•Example 6…

Solution
•X + Y can have the values 0, 1, 2, 3, 4.
•The Probability Distribution of X+Y
•The Probability Distribution of X+Y
The distribution of X + Y

•The Expected Value and Variance of X + Y
The distribution of X + Y

The expected value and variance of X + Y can be calculated from the distribution of X + Y.
E(X+Y)=0(.12)+ 1(63)+2(.19)+3(.05)+4(.01)
=1.2
V(X+Y)=(0-1.2)2(.12)+(1-1.2)2(.63)+…+(4-1.2)2(0.01) =.56
•The Expected Value and Variance of X + Y
The following relationship can assist in calculating E(X+Y) and V(X+Y)
•E(X+Y) =E(X) + E(Y);
•V(X+Y) = V(X) +V(Y) +2COV(X,Y)
•When X and Y are  independent
COV(X,Y) = 0, and
V(X+Y) = V(X)+V(Y).
•Laws of Expected Value and Variance
Laws of expected value
§E(c) = c
§E(X + c) = E(X) + c
§E(cX) = cE(X)
§E(cX + b) = cE(X) + b
§
Laws of variance
§V(c) = 0
§V(X + c) = V(X)
§V(cX) = c2V(X)
§V(cX + b) = c2V(X)
§
•Example 7
With the probability distribution of cars sold per week, assume a salesman earns a fixed weekly wage of \$150 plus \$200 commission for each car sold. What is his expected wage, and the variance of the wage, for the week?
Solution
•The weekly wage Y = 200X + 150
•E(Y) = E(200X + 150) = 200E(X) + 150
= 200(2.4) + 150 = \$630
•V(Y) = V(200X + 150) = 2002V(X)
= 2002(1.24) = \$49 600
•7.5 Portfolio Diversification and Asset Allocation
•
•7.5 Portfolio Diversification and Asset Allocation…
•
Mean and variance of a portfolio of two stocks
E(Rp)   = w1 E(R1) + w2 E(R2)
V(Rp)   =  w12 V(R1) + w22 V(R2) + 2w1w2COV(R1, R2)
= w12σ12 + w22σ22 + 2w1w2ρσ1σ2
where
•w1 and w2 are the proportions or weights of investments 1 and 2,
•E(R1) and E(R2) are their expected values,
•σ1 and σ2 are their standard deviations, and
•ρ is the coefficient of correlation.

•Example 8
An investor has decided to form a portfolio by putting 25% of his money into McDonald’s stock and 75% into Cisco Systems stock. The investor assumes that the expected returns will be 8% and 15%, respectively, and that the standard deviations will be 12% and 22%, respectively.
a.  Find the expected return on the portfolio.
b.  Compute the standard deviation of the returns on the   portfolio assuming that
(i)  the two stocks’ returns are perfectly positively   correlated
(ii)  the coefficient of correlation is .5
(iii)  the two stocks’ returns are uncorrelated.
a. The expected values of the two stocks are
E(R1) = 0.08  and E(R2) = 0.15

The weights are w1 = 0.25 and w2 = 0.75.

Thus,
E(R2) = w1E(R1) + w2E(R2)
= 0.25(0.08) + 0.75(0.15)
= 0.1325
b.  The standard deviations are σ1 = .12 and σ2 = .22.

Thus,
V(Rp)   =  w12σ12 + w22σ22 + 2w1w2ρσ1σ2
= (.252)(.122) + (.752)(.222) + 2(.25)(.75)ρ (.12)(.22)
= .0281 + .0099 ρ

i.  When ρ = 1,   V(Rp) = .0281 + .0099(1) = 0.0380
ii.  When ρ = .5,  V(Rp) = .0281 + .0099(.5) = 0.0331
iii.  When ρ = 0,   V(Rp) = .0281 + .0099(0) = 0.0281
•7.6 Binomial Distribution
A binomial experiment can result in only one of two outcomes.
Typical cases where a binomial experiment applies:
•a coin flipped results in heads or tails
•an election candidate wins or loses
•an employee is male or female
•a car is manual or auto-transmission
•Binomial Experiment
•There are n trials (n is finite and fixed).
•Each trial can result in success or failure.
•The probability p of success is the same for all the trials.
•All the trials are independent.

Binomial random variable
•The binomial random variable counts the number of successes in n trials of the binomial experiment.
•By definition, this is a discrete random variable.
•Developing a Probability Distribution
Probability calculation techniques can be used to develop probability distributions.

Example 9
A mutual fund salesperson knows that there is a 20% chance of closing a sale on each call she makes.
What is the probability distribution of the number of sales if she plans to call three customers?
Solution
•Use probability rules and trees.
•Define event S=Success = {a sale is made}. F= Failure=SC
•X = number of sales from 3 calls
Developing the Binomial Probability Distribution in General (n=3)
Developing the Binomial Probability Distribution
5% of an electric bulb production run is defective. A sample of 3 bulbs is drawn. Find the probability distribution of the number of defectives.
Solution
•A bulb can be either defective or good.
•There is a fixed finite number of trials (n = 3)
•We assume the states of the bulbs are dependent on each other.
•The probability of a bulb being defective does not change from bulb to bulb (p = 0.05).
Let X be the binomial random variable indicating the number of defectives.
Define a ‘success’ as ‘a bulb is found to be  defective’.
•Example 11 – Pat Statsdud
(Examples 7.9–7.10)
Pat Statsdud is a (not good) student taking a statistics course. Pat’s exam strategy is to rely on luck for the next quiz. The quiz consists of 10 multiple-choice questions. Each question has five possible answers, only one of which is correct. Pat plans to guess the answer to each question.
i.What is the probability that Pat gets no answers correct?
ii.What is the probability that Pat gets two answers correct?

•Example 11 – Pat Statsdud…
Pat Statsdud is a (not good) student taking a statistics course, whose exam strategy is to rely on luck for the next quiz. The quiz consists of 10 multiple-choice questions. Each question has five possible answers, only one of which is correct. Pat plans to guess the answer to each question.

Algebraically then:
n=10, and P(success) = 1/5 = .20
•Example 11 – Pat Statsdud…
Is this a binomial experiment?
Check the conditions:
ü There is a fixed finite number of trials (n=10).
ü An answer can be either correct or incorrect.
ü  The probability of a correct answer, p= 0.20, does not change from question to question.
ü Each answer is independent of the others.
•Example 11 – Pat Statsdud…
n=10, and P(success) = .20

i.  What is the probability that Pat gets no answers correct?
Number of successes, x= 0; hence we want to know P(x=0)

•Example 11 – Pat Statsdud…
n=10, and P(success) = .20

ii.  What is the probability that Pat gets two answers correct?
Number of successes, x = 2; hence we want to know P(x=2)

•Cumulative Probability…
Thus far, we have been using the binomial probability distribution to find probabilities for individual values of x. To answer the question:
‘Find the probability that Pat fails the quiz’
requires a cumulative probability, that is, P(X ≤ x).

If a grade on the quiz is less than 50% (i.e. 5 questions out of 10), that’s considered a failed quiz.

Thus, we want to know what is: P(X ≤ 4) to answer.
•Example 11 – Pat Statsdud…
iii.  Find the probability that Pat fails the quiz.
P(X ≤ 4) = P(0) + P(1) + P(2) + P(3) + P(4)
We already know, P(0) = .1074 and P(2) = .3020. Using the binomial formula to calculate the others:
P(1) = .2684 , P(3) = .2013, and P(4) = .0881
We have
P(X ≤ 4) = .1074 + .2684 + … + .0881 = 0.9672

Thus, its about 97% probable that Pat will fail the quiz using the luck strategy and guessing answers…
•Binomial Table…
Calculating binomial probabilities by hand is tedious and error prone. There is an easier way. Refer to  Table 1 in Appendix B.
For the Pat Statsdud example, n=10, so the first important step is to get the correct table!

•Binomial Table…
The probabilities listed in the tables are cumulative,
i.e. P(X ≤ k), k is the row index; the columns of the table are organised by P(success) = p.

•Example 11 – Pat Statsdud…
i. What is the probability that Pat gets no answers correct?
i.e. what is P(X = 0), given P(success) = .20 and n=10?
•Example 11 – Pat Statsdud…
ii. What is the probability that Pat gets two answers correct?
i.e. what is P(X = 2), given P(success) = .20 and n=10 ?
•Example 11 – Pat Statsdud…
iii.  What is the probability that Pat fails the quiz?
i.e. what is P(X ≤ 4), given P(success) = .20 and n=10 ?

P(X ≤ 4) = 0.9672

The binomial table gives cumulative probabilities for P(X ≤ k), but as we’ve seen in the last example,

P(X = k) = P(X ≤ k) – P(X ≤ [k–1])

Likewise, for probabilities given as P(X ≥ k), we have:
P(X ≥ k) = 1 – P(X ≤ [k–1])

•Using Excel: =BINOMDIST() Excel Function
There is a binomial distribution function in Excel that can also be used to calculate these probabilities. For example:
What is the probability that Pat gets two answers correct?
There is a binomial distribution function in Excel that can also be used to calculate these probabilities. For example:
What is the probability that Pat fails the quiz?
•Binomial Distribution…
As you might expect, statisticians have developed general formulas for the mean, variance, and standard deviation of a binomial random variable. They are:

•Example 12
•Example 12 - Solution
i.E(X) = np = 20(0.30) = 6
ii.V(X) = np(1-p)
= 20(0.30)(0.70) = 4.2
SD(X) = Ö4.2  =  2.04

tag：

QQ： 273427
QQ： 273427

Online Service / 在線客服

Hours / 服務時間

#### 在線客服  Essay_Cheery  #### 在線客服  Essay_Cheery  