Lecture Note 5 - PowerPoint PPT Presentation

1 / 81
About This Presentation
Title:

Lecture Note 5

Description:

A random variable is a variable that takes on numerical values determined by the ... I use an example to illustrate Binominal Distribution ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 82
Provided by: Rafael120
Category:

less

Transcript and Presenter's Notes

Title: Lecture Note 5


1
Lecture Note 5
  • Discrete Random Variables and Probability
    Distributions

2
Random Variables
  • A random variable is a variable that takes on
    numerical values determined by the outcome of a
    random experiment.

3
Discrete Random Variables
  • A random variable is discrete if it can take on
    no more than a countable number of values.

4
Discrete Random Variables(Examples)
  • The outcome of a roll of a die.
  • The number of defective items in a sample of
    twenty items taken from a large shipment.

5
Continuous Random Variables
  • A random variable is continuous if it can take
    any value in an interval.

6
Continuous Random Variables(Examples)
  • The income in a year for a family.
  • The amount of oil imported into the U.S. in a
    particular month.

7
Discrete Random Variables
  • We will study the fundamental concepts of
    discrete random variables, namely (1) Probability
    Distribution Function and (2) Cumulative
    Probability Function.
  • First, we will learn the notation of the
    Probability Distribution Function

8
Understanding the notation for the probability
distribution function
  • Suppose you are about to roll a die. Then, number
    you would get after the roll is a discrete random
    variable. Let X denote this random variable.
  • Then this random variable X can take 6 possible
    outcomes from S1, 2, 3, 4, 5, 6.

9
Understanding the notation for the probability
distribution function, contd
  • Then, probability that the random variable X
    takes the value 1 (i.e., the probability that you
    get 1 after rolling the die) is 1/6. This can be
    conveniently expressed using the following
    notation.
  • P(1)P(X1)1/6
  • Similary, we have
  • P(2)P(X2)1/6
  • P(3)P(X3)1/6
  • .
  • .
  • P(6)P(X6)1/6

10
Understanding the notation for the probability
distribution function, contd
  • We can generalize the notation in the previous
    slides to other discrete random variables. let X
    be any discrete random variable, which takes k
    possible values from Sx1, x2, , xk
  • Conventionally, we use capital letter X to
    denotes the random variable, and small letter x
    to denote the possible values that X can take.

11
Understanding the notation for the probability
distribution function, contd
  • Now, let x be any values from Sx1, x2, , xk
  • Then the probability that the random varialbe X
    takes the value x can be written in the following
    notation
  • P(x)P(Xx)
  • This notation is what is called Probability
    Distribution Function. The next slide re-iterate
    this definition.

12
Probability Distribution Function
  • The probability distribution function, P(x), of a
    discrete random variable expresses the
    probability that X takes the value x, as a
    function of x. That is

13
Probability Distribution Function-Exercise 1-
  • Ex 1-1 Suppose you roll a die. Let X be the
    random variable for this experiment. Find the
    probability distribution function P(x) by
    completing the table in the Excel Sheet
    Probability Distribution Function Exercise.
  • EX 1-2 Plot the probability distribution
    function.

14
Probability Distribution Function-Exercise 2-
  • Consider the following game. You toss a coin. If
    you get the heads, you receive \100. If you gets
    the tales, you receive none.
  • The payoff for this game is a discrete random
    variable. Let X denotes this random variable.
    Find the probability distribution of this random
    variable, by completing the table in Probability
    Distribution Function Exercise

15
Required Properties of Probability Distribution
Functions of Discrete Random Variables
  • Let X be a discrete random variable with
    probability distribution function, P(x). Then
  • P(x) ? 0 for any value of x
  • The individual probabilities sum to 1 that is
  • Where the notation indicates summation over all
    possible values x.

16
Cumulative Probability Function
  • The cumulative probability function, F(x0), of a
    random variable X expresses the probability that
    X does not exceed the value x0, as a function of
    x0. That is
  • Where the function is evaluated at all values x0

17
Cumulative Probability Function-Example 3-
  • 3-1 Let X be the random variable for a roll of a
    die. Find F(1), F(2), F(3), to F(6).
  • 3-2 Plot F(x) and x.

18
Derived Relationship Between Probability Function
and Cumulative Probability Function
  • Let X be a random variable with probability
    function P(x) and cumulative probability function
    F(x0). Then it can be shown that
  • Where the notation implies that summation is over
    all possible values x that are less than or equal
    to x0.

19
Expected Value
  • Expected value is a similar concept as the
    average. More specifically, it is the weighted
    average with the weight given by the probability
    of each outcome.
  • For example, consider the game. You toss a coin.
    If you get the heads, you receive \100. If you
    get the tails, you receive none.
  • Then the expected payoff for this game is
  • \100(probability of getting \100)
  • \0(probability of getting \0) \50
  • More formally, expected value is defined as
    follow. See next slide.

20
Expected Value
  • The expected value, E(X), of a discrete random
    variable X is defined
  • Where the notation indicates that summation
    extends over all possible values x.
  • The expected value of a random variable is called
    its mean and is denoted ?x.

21
Understanding the notation of the expected value
  • Let X be the random variable which takes
    value in Sx1, x2,..,xk.
  • Then the expected value of X is computed as
    follows. See next slide

22
µX
23
Expected Value Exercise-Exercise 4-
  • Let X be the random variable that shows the the
    number of house purchase contracts that an real
    estate agent can achieve in a month. The
    probability distribution of X is given by the
    following.
  • Compute the expected number of house
    purchase contracts that the real estate agent can
    achieve in a month.

24
Expected Value Functions of Random Variables
  • Let X be a discrete random variable with
    probability function P(x) and let g(X) be some
    function of X. Then the expected value, Eg(X),
    of that function is defined as

25
Expected Value Functions of Random
Variables-Exercise 5-
  • Continue using the real estate agent example.
    Suppose that the monthly salary for the real
    estate agent is given by
  • g(x) 1000 1500x
  • Ex 5-1 Find the expected monthly salary of
    the agent. Use the Probability Distribution
    Function Exercise Excel Sheet.

26
Variance and Standard Deviation
  • Let X be a discrete random variable. The
    expectation of the squared discrepancies about
    the mean, (X - ?)2, is called the variance,
    denoted ?2x and is given by
  • The standard deviation, ?x , is the positive
    square root of the variance.
  • Often we use the Var(X) to denote the variance
    and SD(X) to denote the standard deviation

27
Understanding the procedure to compute the
variance
  • The table in the next slide summarizes the
    procedure to compute variance.

28
(No Transcript)
29
Variance and Standard Deviation-Exercise 6-
  • Continue using the real estate agent example.
    Using the table in the Probability Distribution
    Function Exercises Excel sheet, answer the
    following questions.
  • Ex 6-1 Compute the variance
  • Ex 6-2 Compute the standard deviation

30
Summary of Properties for Linear Function of a
Random Variable
  • Let X be a random variable with mean ?x , and
    variance ?2x and let a and b be any constant
    fixed numbers. Define the random variable Y a
    bX. Then, the mean and variance of Y are
  • and
  • so that the standard deviation of Y is

31
Linear Function of a Random Variable-Exercise 7-
  • Continue using the example of real estate agent
    from exercise 4, 5, and 6.
  • Suppose that the monthly salary for this agent,
    Y, is determined in the following method.
  • Y1000 1500X
  • Ex 6-1 Compute E(Y) using the formula in the
    previous slide.
  • Ex 6-2 Compute the variance and standard
    deviation of Y

32
Standardization of a Random Variable
  • Let X be a random variable with mean ?X and
    standard deviation ?X. Define a new random
    variable Z as
  • Then
  • E(Z)0
  • Var(Z)1

33
Exercise 8
  • Continue using the real estate agent example. Let
    X be the random variable for the possible number
    of contracts the agent can achieve in a month.
  • Standardize X using the formula in the previous
    slide, and verify that this is mean zero and
    variance 1.

34
Reviews of Combinatorics and Common discrete
distributions
  • Review of Combinatorics
  • Number of orderings
  • Number of combinations
  • Number of sequences of x Successes in n Trials
  • Common discrete distributions
  • Bernoulli Distribution
  • Binomial Distribution

35
Stock Price Movement Example
  • To motivate the study of combinatrics and the
    discrete distributions, let us consider a simple
    example of stock price movement. The example will
    utilize these combinatrics and distributions.

36
Stock Price Movement Example
  • The price of Stock A today is 10. At the end of
    each month, the price of the stock A either goes
    up by the factor of 1.2 with probability 0.4, or
    goes down by the factor of 0.9 with probability
    0.6.
  • This means that, if the price of the stock goes
    up this month, then the price of the stock in the
    second month will be 101.2 12. If the price
    of the stock goes up this month, and goes down in
    the second month, the price of the stock in the
    third month will be 101.20.9 10.8.

37
Stock Price Movement Example, Contd
  • Suppose that you make the following contract with
    a stock broker.
  • You have the right to purchase a share of
    stock A at the price equal to 37.61 at the
    beginning of the 13th month (That is, a year from
    today).
  • Then, if the actual market price of stock A is
    higher than 37.61, you purchase the stock and
    immediately sell it to make a positive profit. If
    the actual price is lower than 37.61, you do not
    have to exercise the right.
  • Then consider the following question.
  • See next slide

38
Stock Price Movement Example, Contd
  • Question
  • What is the probability that you make some
    strictly positive profit from this contract
    (ignoring all the fees associated with the
    contract and buying and selling of the share)
  • Answer to this question requires tools such as
    combinatorics and Binomial distributions.
  • In the following slides, we will review
    combinatorics and some common distributions.
    After studying these concepts, we will come back
    to the question again.

39
Review of Combinatorics-Number of orderings-
  • You have n cards numbered from 1 to n. The number
    of ways you can order this card is given by
  • n!n(n-1) (n-2) 321
  • n! reads n factorial
  • 0! is defined to be 1.

40
Number of ordering example
  • There are 5 cards numbered from 1 to 5. What is
    the number of ways you can order this card?

41
Review of Combinatorics-Combinations-
  • Suppose there are n cards numbered from 1 to n.
    If you take x cards out of n cards, the number of
    possible combinations of the cards is given by

Where n!n(n-1) (n-2) 321
Cnx reads n choose x.
42
Combinations -Example-
  • A personnel officer has eight candidate to fill
    four similar positions. What is the total number
    of possible combinations of four candidate chosen
    from eight?

43
Review of combinatorics- sequences of x
Successes in n Traials-
  • Consider a random trial where there are only two
    outcomes, Success or Failure.
  • Then, if you make n independent trials, the
    number of sequences that contains exactly x
    successes is equal to Cnx.

44
Sequences of Successes-Exercise-
  • Consider tossing a coin 10 times. Find the number
    of ways the head appears exactly 4 times.

45
Number of sequences-Exercise-
  • Suppose that the figure below is a road map of a
    certain area. If you start from point A and walk
    to point B, how many possible routes can you
    take? (Suppose you do not walk back)

B
A
46
Bernouli Trial
  • Bernouli Random Trial with success probability ?.
  • This is a random experiment with two possible
    outcomes, success or failure, where the
    probabilities are given by
  • P(Success) ?
  • P(Failure) 1- ?

47
Bernouli Random Variable
  • Consider a Bernouli Trial with P(Success) ?.
    Define a random variable X in the following way.
  • X1 if the Bernouli random trial turn out to be
    success
  • X0 if the Bernouli random trial turns out to be
    a failure.
  • Then, X is called a Bernouli Random Variable
    with success probability ?.

48
Bernouli Distribution
  • Consider a Bernouli random variable X with
    success probability ?. Then probability
    distribution function for X is called Bernouli
    Distribution with success probability ?. This is
    given by
  • P(0)(1- ?) and P(1) ?

49
Bernouli Distribution -Example-
  • Consider the following game. You toss a coin. If
    you get the heads, you receive 1. If you get the
    tails, you receive none. Let X be the random
    variable for the payoff of this game.
  • X has the Bernouli distribution with success
    probability 0.5.

50
Mean and Variance of a Bernoulli Random Variable
  • The mean is
  • And the variance is

51
Binomial Distribution-Example-
  • I use an example to illustrate Binominal
    Distribution
  • You inspect a production line by randomly
    checking the items. It is known that 5 of the
    products from this production line are defect
    items.
  • Suppose you randomly choose 4 items from the
    production line. Then number of defect items you
    would find is a discrete random variable.

52
Binomial Probability -Examples, Contd-
  • Let X be the number of defect items in the 4
    randomly picked items. What is the probability
    that exactly 2 of them are defect items?
  • To answer to this question, first, consider the
    possible sequences that 2 defect items are
    picked.

53
  • The number of possible sequences you pick 2
    defect items is given in the table. D denote the
    defect item, and G denote the good item.
  • Note that the number of sequences is given by
    C42.

54
  • Since the probability of picking one defect item
    is 0.05, and the probability of picking one good
    item is 0.95, the probability of getting each
    sequence is 0.0520.9520.002256.
  • Since there are 6 sequences, the probability that
    you get exactly 2 defect items is given by
    (0.002256)60.0135

55
  • We can generalize this problem. Consider a
    production line. The probability that an item
    from this production line is a defect item ?.
  • Suppose that you pick n products from this
    production line. Then, the probability that the
    number of defect items is exactly x is given by
  • This probability distribution function is called
    Binomial Distribution with success probability
    ?. Next slide summarizes the binomial
    distribution.

56
Binomial Distribution
  • Suppose that a random experiment can result in
    two possible mutually exclusive and collectively
    exhaustive outcomes, success and failure, and
    that ? is the probability of a success resulting
    in a single trial. If n independent trials are
    carried out, the distribution of the resulting
    number of successes x is called the binomial
    distribution. Its probability distribution
    function for the binomial random variable X x
    is
  • P(x successes in n independent trials)
  • for x 0, 1, 2 . . . , n

57
Mean and Variance of a Binomial Probability
Distribution
  • Let X be the number of successes in n independent
    trials, each with probability of success ?. The
    x follows a binomial distribution with mean,
  • and variance,

58
Binomial Probabilities- An Example
A sales person randomly visits houses to sell a
certain product. He believes that for each visit,
the probability of making a sale is 0.40.
If the sales person visits 5 houses, what is the
probability that he makes at least 3 sale?
59
Answer
Let X be the random number for the number of
sales. Then, P(At leaset 3 sale) P(X 3)
P(X 3) P(X 4)P(X5)
P(makes at least 3 sales)P(3)P(4)P(5) 0.23040
.07680.010240.31744
60
Computing Binomial Distribution using Excel
  • Let n be the total number of trial. Let x be
    the number of success, and ? be the success
    probability. Excel function to compute binimial
    probabilities is
  • P(Xx) BINOMDIST(x, n, ?, FALSE)
  • P(Xx)BINOMDIST(x,n, ?, TRUE)
  • Note that if you put FALSE at the end, it
    computes the binomial probability distribution.
    If you put TRUE at the end, it computes the
    cumulative binomial distribution.

61
Binomial Distribution-Exercise-
  • Open Binomial Distribution Exercise
  • Find the Binomial Distribution Function for n50
    and ?0.3. Then, graph the Binomial Probability
    Distribution.

62
Binomial Distribution Function with n50 and
?0.3.
63
Stock Price Movement Example
  • Now, we come back to the Stock Price Movement
    example that we saw at the beginning.
  • First, take a look at how the stock price may
    move in the first three months. See the next slide

64
Stock price movement for the first three months
As can be seen, there are three possible values
for the stock price in the third month. Now
answer the questions in the next slide.
65
  • Q1 In the 13th month, how many possible values
    for the stock price are there?
  • Q2. Show that the 4th highest price is 37.61
  • Q3. What is the probability that the stock price
    at the beginning of 13th month is equal to the
    4th highest price, 37.61?
  • Q4. Remember the contract. The contract is You
    have the right to purchase a share of the stock A
    in the 13th month at the price equal to 37.61.
    Then what is the probability that you get some
    positive profit from this contract (ignoring all
    the fees associated with buying and selling the
    stock)

66
Joint Probability Functions
  • Consider two stocks Stock A and Stock B. Let X
    denote the random variable for the return of
    stock A. Let Y denote the random variable for the
    return of Stock B.
  • Suppose that X takes 4 possible values 0, 0.05,
    0.1, and 0.15.
  • Further, suppose that Y takes 4 possible values,
    0, 0.05, 0.1 , and 0.15.
  • The joint probabilities of X and Y are given in
    the table in the next slide.

67
Joint Probability Function-Example-
68
Joint Probability Functions
  • Let X and Y be a pair of discrete random
    variables. Their joint probability function
    expresses the probability that X takes the
    specific value x and simultaneously Y takes the
    value y, as a function of x and y. The notation
    used is P(x, y) so,

69
Marginal Probability Functions
  • Let X and Y be a pair of jointly distributed
    random variables. In this context the
    probability function of the random variable X is
    called its marginal probability function and is
    obtained by summing the joint probabilities over
    all possible values that is,
  • Similarly, the marginal probability function of
    the random variable Y is

70
Exercise
  • Open Joint Probability Exercise. This sheet
    contains the joint probability example of stock A
    return (X) and Stock B return (Y) in the previous
    example.
  • Find the Marginal distribution.

71
Conditional Probability Functions
  • Let X and Y be a pair of jointly distributed
    discrete random variables. The conditional
    probability function of the random variable Y,
    given that the random variable X takes the value
    x, expresses the probability that Y takes the
    value y, as a function of y, when the value x is
    specified for X. This is denoted P(yx), and so
    by the definition of conditional probability
  • Similarly, the conditional probability function
    of X, given Y y is

72
Exercise
  • Continue using the same example. Compute the
    following conditional probabilities.
  • P(X0Y0.1)
  • P(Y0.15X0.1)

73
Independence of Jointly Distributed Random
Variables
  • The jointly distributed random variables X and Y
    are said to be independent if and only if their
    joint probability function is the product of
    their marginal probability functions, that is, if
    and only if
  • And k random variables are independent if and
    only if

74
Exercise
  • Using the example in the Joint Distribution
    Exercise, check to see if X and Y are
    statistically independent.

75
Covariance
  • Let X be a random variable with mean ?X , and let
    Y be a random variable with mean, ?Y . The
    expected value of (X - ?X )(Y - ?Y ) is called
    the covariance between X and Y, denoted Cov(X,
    Y).
  • For discrete random variables
  • An equivalent expression is

76
Correlation
  • Let X and Y be jointly distributed random
    variables. The correlation between X and Y is

77
Covariance and Statistical Independence
  • If two random variables are statistically
    independent, the covariance between them is 0.
    However, the converse is not necessarily true.

78
Exercise
  • Consider the following joint distribution of X
    and Y

Exercise Cov(X,Y), Var(X), Var(Y) and CORR(X,Y).
79
Portfolio Analysis
  • The random variable X is the price for stock A
    and the random variable Y is the price for stock
    B. The market value, W, for the portfolio is
    given by the linear function,
  • Where, a, is the number of shares of stock A and,
    b, is the number of shares of stock B.

80
Portfolio Analysis
  • The mean value for W is,
  • The variance for W is,
  • or using the correlation,

81
Exercise
  • Consider Stock A and Stock B. Let X and Y denote
    the market price of stock A and B respectively.
    It is known that E(X)10, E(Y)20, Var(X)2,
    Var(Y)4, and Cov(X,Y)?1. Now consider the
    following portfolio.
  • W5X 4Y.
  • Find E(W), Var(W).
Write a Comment
User Comments (0)
About PowerShow.com