Probability and stochastic models

download Probability and stochastic models

of 78

description

Probability and stochastic models lesson 1

Transcript of Probability and stochastic models

  • Outline

    1 Fundamental probability2 Univariate random variable, distribution, and other key functions3 Discrete r.v. and distributions4 Continuous r.v. and distributions5 Moments6 Quantiles and boxplots7 MGF and other key functions

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 3 / 1

  • I Probability: some concepts and terminologies

    Approaches to probability different approaches.

    We use axiomatic approach: probabilities are defined as mathematicalobjects that behave according to certain well-defined rules

    Sample Space : S = set of all possible outcomes

    Event : any subset of S

    Experiment : any process of observation or measurement

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 4 / 1

  • Eg Roll a die; see the number turning up. (Experiment)

    Sample space isS = {1,2, . . . ,6}

    The event that the number turned up is even is

    A = {2,4,6}

    The event that the number is less than 4 is

    B = {1,2,3}

    {Notice that S,A,B above are called sets in set theory}

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 5 / 1

  • Union of 2 events A,B write as A B, can also read as A or B, meaning either Aoccurs or B occurs (or both occur)

    Intersection of 2 events A,B write as A B, can also read as A and B, meaning bothA and B occur

    Complement of an event A write as A, meaning the event that A does not occur ,and thus contains all the elements of S that are not in A.

    Consider the event E that the number is less than 2,i.e. E = {1},

    A E = empty set

    In such cases, the 2 events A and E are said to be mutually exclusive or disjoint .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 6 / 1

  • Venn Diagrams

    A B A B

    A B A B

    A A B =

    A B

    A

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 7 / 1

  • Some laws of set theory:

    (i) A B = B A(ii) A B = B A(iii) (A B) C = A (B C) = A B C(iv) (A B) C = A (B C) = A B C(v) (A B) C = (A C) (B C)(vi) (A B) C = (A C) (B C)

    (i) and (ii) are clear

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 8 / 1

  • (iii) A B C (iv) (A B) C

    A B

    C

    A B

    C

    (v) (A B) C (A C) (B C)

    A B

    C

    (vi) try yourself

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 9 / 1

  • II Probability of an event

    Postulates of probability (no proof but makesense)

    1. P(A) 0, for any A S (any A which is a subset of samplespace S)

    2. P(S) = 1

    3. If A1,A2,A3, . . . is a finite or infinite sequence of mutuallyexclusive events of S, then

    P(A1 A2 ) = P(A1) + P(A2) +

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 10 / 1

  • Some rules of probability

    1. P(A) = 1 P(A)

    2. P() = 0

    3. If A B, then P(A) P(B)

    4. 0 P(A) 1

    5. P(A B) = P(A) + P(B) P(A B)

    6. P(A B C) = P(A) + P(B) + P(C) P(A B) P(A C) P(B C) + P(A B C)

    7. P(A B) = P(B) P(A B)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 11 / 1

  • III Conditional probability and independent eventsP(F W ) = P(F |W ) P(W )

    called Multiplication Rule (General)

    Definition : For any events A and B, we have

    P(A|B) = P(A B)P(B)

    , where P(B) 6= 0

    Intuitively sensible

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 12 / 1

  • Definition : Two events A and B are indepen-dent, iff

    P(A|B) = P(A|B)

    Definition : Two events A and B are indepen-dent, iff

    P(A B) = P(A) P(B)

    Multiplication Rule (independent case)

    Also note A and B are independent iffP(A|B) = P(A)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 13 / 1

  • IV Bayes Theorem

    Note

    P(A B) = P(A|B)P(B) = P(B|A)P(A)

    = P(B|A) =P(A|B)P(B)

    P(A), where P(A) 6= 0

    Bayes Theorem (one form)

    Remark : Get the reverse (conditional) probability

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 14 / 1

  • In general, for any event A; and k mutually ex-clusive events B1, . . . ,Bk , and they are exhaus-tive, i.e.

    B1 B2 Bk = S, and P(Bi) > 0,for all i . Then

    P(Br |A) = P(A|Br)P(Br)ki=1

    P(A|Bi)P(Bi); r = 1, . . . , k

    Bayes Theorem

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 15 / 1

  • Note:

    P(A) = P(A B1) + P(A B2) + + P(A Bk)

    =ki=1

    P(A|Bi)P(Bi)

    is called rule (or law) of total probability (or rule ofelimination)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 16 / 1

  • Random VariableRandom variable X A real-valued function defined on a sample spacewith a probability measure.

    Cumulative distribution function (cdf): F (x) = P(X x) < x

  • Discrete r.v.

    Discrete r.v. A r.v. that can take on finite orcountable infinite possible valuesProbability mass function: p(a) = P {X = a}.

    p(xi) 0 i = 1,2, p(x) = 0 all other values of xi=1

    p(xi) = 1.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 18 / 1

  • Example 1

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 19 / 1

  • Continuous r.v.

    Continuous r.v. P {X B} = B f (x)dx .Eg:

    ba f (x)dx = P {a X b}

    Probability density function of the r.v. X : f .Properties:{

    f (x) 0 f (x)dx = P {X (,)} = 1

    I All probability statements about X can be answered in terms of f .I P(X = a) = 0.I F is differentiable: dF (x)/dx =?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 20 / 1

  • Example 2

    A real number is randomly chosen from [0,1]. Then this number is squared. Let Xrepresent the result. Find the PDF and CDF for X .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 21 / 1

  • Outline I

    1 Bernoulli(*)2 Binomial(x) (***)3 Geometric4 Hypergeometric5 Negative binomial6 Discrete uniform7 Poisson (***)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 22 / 1

  • 1 Bernoulli distribution

    A trial has 2 possible outcomes, success andfailure, with probabilities, p and 1 p, then thenumber of successes X is being 0 or 1

    f (x) =

    {1 p for x = 0p for x = 1

    failure successx 0 1

    f (x) 1 p p

    = px(1 p)1x , x = 0,1 Bernoulli distributionE(X ) = p;Var(X ) = p(1 p).

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 23 / 1

  • Example I.1

    During a policy year, an AIA life insurance policyeither results in a single claim if the policyholder dieswith a probability of 0.1% or results in no claimsotherwise.Find the average number of claims and its variabilityon the policy during the policy year aforementioned.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 24 / 1

  • 2 Binomial distribution

    Bernoulli trials: each trial has 2 possible outcomes(to which the Bernoulli distribution applies),repeatable, independent

    X : # of successes in a sequence of n Bernoullitrials with P (success) = pEg # of correct answers in n multiple choice questions purely by sheer

    guessing

    b(x ;n,p) =(

    nx

    )px(1 p)nx , x = 0,1,2, . . . ,n

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 25 / 1

  • Remarks w.r.t b(x;n,p)

    Where does the name Binomial come from?

    (q + p)n = b(0;n,p) + b(1;n,p) + + b(n : n,p).The most often used discrete random distributionApplication area: Dichotomous outcomes in anyindustrial situation;Medical and military: cure, no cure; hit, miss;

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 26 / 1

  • Remarks w.r.t b(x;n,p)

    E(X ) = np, Var(X ) = np(1 p); probability massfunctions when n=2, 3;

    X =n

    i=1Yi ; sum of iid.

    Application in insurance: model frequency, i.e. #of losses;Eg; The total # of rare events like burglaries orfires that happens to a group of geographicallydispersed homes.In Exam P, binomial, negative binomial, andgeometric distributions will not be told.Justify b(x;n,p).

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 27 / 1

  • Example I.2

    As the lawyer for a client accused of murder, you are looking for waysto establish reasonable doubt in the minds of the jurors. Central tothe prosecutors case is testimony from a forensics expert who claimsthat a blood sample taken from the scene of the crime matches theDNA of your client. One-tenth of 1% of the time, though, such tests arein error.Suppose your client is actually guilty. If six other labs in the country arecapable of doing this kind of DNA analysis (and you hire them all),what are the chances that at least one will make a mistake andconclude that your client is innocent?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 28 / 1

  • 3 Geometric distribution

    Interested in the number of trials (X ) to get thefirst success, where P(success) = p,

    f (x) = (1 p)x1p x = 1,2, . . .E(X ) = 1/p ; Var(X ) = (1 p)/p2

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 29 / 1

  • Remark

    Memoryless property:P(X = n 1 + k |X > n 1) = P(X = k).Eg: Radioactive decay If time is divided into consecutiveintervals of equal duration, the period in which a nucleus decays ismodeled by the geometric distribution, where p is a function of theatoms half-life.Double-your-bet: One of the cant miss schemes that everywould-be gambler sooner or later reinvents is the double-your-betstrategy. Imagine playing a series of evenly matched games. Youbet 1 on the first game; if you lose, you bet $2 on the secondgame; if you lose that one, too, you bet $4 on the third game; andso on. Suppose you win for the first time on the k th game, you netwinning will be $1.It would appear that doubling our bets guarantees a profit. Whereis the catch?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 30 / 1

  • Example I.3

    1 At busy time a telephone exchange is very near capacity, so callershave difficulty placing their calls. It may be of interest to know thenumber of attempts necessary in order to gain a connection. Supposethat we let p = 0.05 be the probability of a connection during busy time.We are interested in knowing the probability that 5 attempts arenecessary for a successful call.

    2 The annual number of losses incurred by a policyholder of an autoinsurance policy, N, is geometrically distributed with parameters p = 0.4.Find E(N 2|N > 2), Var(N 2|N > 2), E(N|N > 2), Var(N|N > 2).

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 31 / 1

  • 4 Hypergeometric distributionA bag of N balls, k red, N k orange. Select nrandomly without replacement. Let X be the no. ofthe red balls selected

    h(x ;N,n, k) =

    (kx

    )(N kn x

    )(

    Nn

    ) x = 0,1, . . . ,nx kn x N k

    E(X ) =nkN

    ; Var(X ) =nk(N k)(N n)

    N2(N 1)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 32 / 1

  • Remark

    Sampling without replacement.Eg: Acceptance sampling; electronic testing; quality assuranceRelationship to Binomial:As a rule of thumb, a binomial distribution can be used toapproximate the hypergeometric distribution when nN 0.05. Thusthe quantity kN plays the role of the binomial parameter p.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 33 / 1

  • Example I.4

    A manufacture of automobile tires reports that among a shipment of5000 sent to a local distributor, 1000 are slightly blemished. If onepurchase 10 of these tires at random from the distributor, what is theprobability that exactly 3 are blemished?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 34 / 1

  • 5 Negative binomial distribution

    Number of trials (X ) needed to get k successes

    f (x) =(

    x 1k 1

    )pk(1 p)xk , x = k , k + 1, . . .

    E(X ) = k/p ;Var(X ) = k(1 p)/p2

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 35 / 1

  • Application in insurance

    The number of claims is a negative binomial distribution ifi) The number of claims by the insured has a Poisson distribution with mean;ii) changes from one risk group to another (i.e. low risk insureds have alower average claim than a high risk group) and have a gamma distribution.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 36 / 1

  • Example I.5

    The total number of claims in a year incurred by a small block of autoinsurance policies is modeled as a negative binomial distribution with p = 0.2and k = 5. If there is a claim, the claim amount is $2000 per claim for allclaims. Find the probability that the total amount of annual claims incurred bythis block of auto insurance will exceed $100,000.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 37 / 1

  • 6 Discrete uniform distributionEqually likely outcomes

    f (x ; k) =1k, forx = x1, x2, . . . , xk

    E(X ) =ki=1

    xik

    ;

    Var(X ) =i

    (xi )2 1k

    Eg: Roll a die.

    1 2 3 4 5 6

    )(xf

    x

    61

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 38 / 1

  • AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 39 / 1

  • Example I.6

    When a light bulb is selected at random from a box that contains a 40-wattbulb, a 60-watt bulb, a 75-watt bulb, and a 100-watt bulb, each element of thesample space S = {40,60,75,100} occurs with probability 1/4. i) Write outits probability mass function; ii) Get the average and variability.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 40 / 1

  • 7 Poisson distribution

    P(X = x) =xe

    x!, x = 0,1, ,n.

    Poisson approximation to Binomial: n independent trials, each withsuccess rate p. When n is large and p is small enough to make npappropriate, then the number of success occuring is approximately aPoisson r.v. with parameter = np.

    Application:

    No. of people in a community who survive to age 80;No. of misprints on a page of a book;No. of customers entering a post office on a given day.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 41 / 1

  • Example I.7

    i) Mary hospital draws its patients from a rural area that has twelve thousandelderly residents. The probability that any one of the 12 thousand will have aheart attack on any given day and will need to be connected to a specialcardiac monitoring machine has been estimated to be one in eight thousand.Currently the hospital has three such machines. What is the probability thatequipment will be inadequate to meet tomorrows emergencies?ii) Suppose that typographical errors are made at the rate of 0.4 per page inPoly Us campus newspaper. If next Thursdays edition is 16 pages long, whatis the probability that fewer than three typos will appear?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 42 / 1

  • Outline II

    1 Continuous Uniform Distribution(*)2 Normal Distribution (****)3 Gamma Distribution(**)4 Exponential Distribution(***)5 Lognormal Distribution6 Weibull Distribution7 Beta Distribution8 Pareto Distribution

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 43 / 1

  • The continuous uniform distribution

    pdf

    f (x) =

    {1

    if < x < 0, otherwise

    cdf

    F (x) =

    1, if x x if < x < 0, if x .

    E(X ) = +2 ,Var(X ) =()2

    12

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 44 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 45 / 1

  • Example II.1

    1 The conference room in Department of Applied Mathematics can bereserved for no more than 4 hours. However, the use of the conferenceroom is such that both long and short conferences occur quite often. Infact, it can be assumed that length X of a conference has a uniformdistribution on the interval [0,4]. What is the probability that any givenconference lasts at least 3 hours?

    2 Suppose that X has a uniform distribution on the interval (0,a), wherea > 0. Find P

    {X > X 2

    }.

    3 In a policy year, a low risk auto insurance policyholder can incur eitherone loss with probability of p or no loss with probability of 1 p. p isuniformly distributed over [0, 0.3]. If there is a loss, loss is uniformlydistributed over [500,2500].Assume that the probability of having a loss and the loss amount areindependent. Find the expected loss incurred by the policyholder in apolicy year.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 46 / 1

  • The univariate normal distribution

    pdf

    f (x , , 2) =12pi

    exp{(x )2

    22}, < x

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 48 / 1

  • Remark

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 49 / 1

  • Example II.2

    1 An electrical firm manufacture light bulbs that have a life, beforeburn-out, that is normally distributed with mean equal to 800 hours and astandard deviation of 40 hours. Find the probability that a bulb burnsbetween 778 and 834 hours.

    2 There are 90 students in a statistics class. Suppose each student has astandard deck of 52 cards of his/her own, and each of them selects 13cards at random without replacement from his/her own deckindependent of the others. What is the chance that there are more than50 students who got at least 2 or more aces?

    3 The annual claim amount for an auto insurance policy has a mean of$30,000 and a standard deviation of $5,000. A block of auto insurancehas 25 such policies.Assume individual claims from this block of auto insurance areindependent. Using normal approximation, find the probability that theaggregate annual claims for this block of auto insurance exceed$800,000.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 50 / 1

  • The Gamma distributionpdf: > 0, > 0, () =

    0 x

    1exdx

    f (x ;, ) =

    {1

    ()x1ex/ if x > 0

    0, elsewhere

    E(X ) = ,Var(X ) = 2

    Alternative

    f (y ;, ) =

    {

    ()y1ey if y > 0

    0, elsewhere

    E(Y ) = /,Var(Y ) = /2

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 51 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 52 / 1

  • Example II.3

    1 Solve the integration +

    0 et tndt .

    2 In a biomedical study with rats, a dose-response investigation is used todetermine the effect of the dose of a toxicant on their survival time. Thetoxicant is one that is frequently discharged into the atmosphere from jetfuel. For a certain dose of the toxicant the study determines that thesurvival time, in weeks, has a gamma distribution with = 5 and = 10.What is the probability that a rat survives no longer than 60 weeks?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 53 / 1

  • The exponential distributionpdf: > 0

    f (y ;) =

    {ey if y > 00, elsewhere

    E(Y ) = 1/,Var(Y ) = 1/2

    Alternative: > 0

    f (x ; ) =

    {1ex/ if x > 0

    0, elsewhere

    E(X ) = ,Var(X ) = 2

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 54 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 55 / 1

  • Example II.4

    1 Let X be the time (in hours) required to repair a computer system. Weassume that X has an exponential distribution with parameter = 1/4.Find (a)The cdf of X .(b) P(X > 4).(c)P(X > 10|X > 8)

    2 You have a car and a van. The time-to-failure of the car and thetime-to-failure of the van are two independent exponential randomvariables with mean of 8 years and 4 years respectively.Calculate the probability that the car dies before the van.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 56 / 1

  • The Lognormal distribution

    pdf

    f (x , , ) =

    {1

    2pixexp{ (ln x)222 }, x 0.

    0, x < 0

    E(X ) = e+2/2,Var(X ) = e2+2(e2 1)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 57 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 58 / 1

  • Example II.5

    1 Concentration of pollutants produced by chemical plants historically areknown to exhibit behavior that resembles a lognormal distribution. Thisis important when one considers issues regarding compliance togovernment regulations. Suppose it is assumed that the concentration ofa certain pollutant, in parts per million, has a lognormal distribution withparameters = 3.2 and = 1. What is the probability that theconcentration exceeds 8 parts per million?

    2 The value of investing $1 in stocks for 20 years is G(dollars). Assumethat Y is lognormal with the parameters lnY = 2 and lnY = 0.3. Findthe probability that Y is between 6 and 8.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 59 / 1

  • The Weibull distribution

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 60 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 61 / 1

  • Example II.7

    For a Weibull random variable X with parameter = 10 and k = 14, find the 80th percentile andP(X > 20).

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 62 / 1

  • The generalized Beta distribution

    where 0 x 1, B(, ) = ()()(+) , and Bx(, ) = x

    0 t1(1 t)1dt .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 63 / 1

  • Simplified Beta distribution

    m = 1 & n = 1 N+ {0}

    f (x ;m,n) = (m+n+2)(m+1)(n+1)xm(1 x)n = 1B(m+1,n+1)xm(1 x)n

    = (m + n + 1)Cnm+nxm(1 x)n

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 64 / 1

  • Diagrams of pdf and cdf

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 65 / 1

  • Example II.8

    A random variable X , 0 X 1, has the followingpdf:

    f (x) = kx3(1 x)2where k is a constant. Find P(X 13) = F (13)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 66 / 1

  • The Pareto distribution

    cdf: > 0, > 0

    F (x) = 1 ( x +

    ), 0 x < +

    For k < , the k -th moment is

    E(X k) =k

    Ck1

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 67 / 1

  • Example II.9

    A Pareto distribution has the parameter = 100 and = 2. Find the 60th percentile.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 68 / 1

  • Moments

    Definition: The r th raw moment (or just the r thmoment) of a r.v. X is E(X r), denoted by r ,provided that it exists:

    r = E(Xr) =

    j

    x rj f (xj) discrete

    =

    x r f (x)dx continuous

    NB: The first raw moment is called the mean of X .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 69 / 1

  • Definition: The r th central moment of a r.v. X ,denoted by r , is E [(X )r ].So

    1 = 0,2 = E [(X )2] called the variance of X , denoted by 2,

    write as var(X ) or V (X )

    2 = E [X 2] {E(X )}2 = 2 2

    is called standard deviation.The ratio of the standard deviation to the mean iscalled the coefficient of variation.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 70 / 1

  • Remarks

    sometimes we consider E [X 3] and E [X 4].Skewness of a distribution: 3 E [(X )3]/3. If 3 > 0, thedistribution is skewed to the right.NB: More accurate to call coefficient of skewness: asymmetry.Kurtosis of a distribution:

    4 E [(X )4]/4 {or 4 = 4 3}

    which measures the peakedness (narrow humped) of a distribution. If4 < 0, the distribution is more peaked than a normal distribution.NB: More accurate to call coefficient of kurtosis: flatness.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 71 / 1

  • Expectation

    Definition: The expected value of X is

    E(X ) =x

    xf (x); =

    xf (x)dx

    (discrete) (continuous)

    E(X ) is also called mean of X , denoted by or x .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 72 / 1

  • Properties1. Expected value of a function g(X) is

    E [g(X)] =x

    g(x)f (x) discrete

    E [g(X)] =

    g(x)f (x)dx continuous

    Eg 2: A point, y, is selected at random from the interval [0,1], dividing the lineinto two segments. What is the expected value of the ratio of the shortersegment to the longer segment?

    2. If a and b are constants, then

    E(aX + b) = aE(X ) + b;E(aX ) = aE(X ); E(b) = b

    3. If c1, . . . , cn are constants, then

    E

    [n

    i=1

    cigi(X )

    ]=

    ni=1

    ciE [gi(X )]

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 73 / 1

  • Median and mode

    Median: If X is a discrete random variable, the median, m, is the point forwhich

    P(X < m) = P(X > m).

    In the event that P(X m) = 0.5 and P(X m) = 0.5, the median isdefined to be the arithmetic average, (m + m)/2.

    If Y is a continuous random variable, its median is the solution to the integralequation, F (m) =

    m fY (y)dy = 0.5.

    Mode: The mode of a r.v. is the most likely value:

    1) Discrete: the value with the largest probability;2) Continuous: the value for which the density function is the largest.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 74 / 1

  • Quantiles

    pth Quantile Let X be a random variable with a continuous cdf F . For 0 < p < 1,define the pth quantile of X to be p = F1(p) or alternatively, F (p) = P(X p) = p.NB:1) It is also called the 100pth percentile of X .

    2) Eg: 70th percentile= 0.7quantile; 0.5 but never 50.

    3) More strictly F (p) p F (p).4) The 50th percentile 0.5 is called the median.

    eg: 0.5, the 0.5 quantile.

    pth Sample Quantile of the order statistics Y1 < < Yn:X1, ,Xn i.i.d. X ; k = p(n + 1).Yk is reasonably taken as an estimate of the quantile p. Hence, Yk is called the pthsample quantile.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 75 / 1

  • Application of sample quantiles

    Boxplot > Five number summary: minimum, the first quartile, median, the thirdquartile, and the maximum.

    Eg I.5: The following data are the ordered realization of a random sample of size 15on a random variable X : 56 70 89 94 96 101 102 102 102 105 106 108 110 113 116.Find the five number summary, the data range, and draw a boxplot of the data.

    Q-Q plot The plot of Yk versus z,pk is called a Q-Q plot.

    Aim: Detect deviations from the normality.

    Normal Q-Q plot The Q-Q plot using normal quantiles are called a normal Q-Q plot.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 76 / 1

  • Moment generating function (MGF)

    Definition: The moment generating function of a random variable X ,where it exits, is given by MX (t) = E [etX ]

    =x

    etx f (x); =

    etx f (x)dx

    (discrete) (continuous)

    Theorem: The r th moment of X , E(X r ) can be obtained as

    d rMX (t)dt r

    t=0

    = r E(X r )denoted by

    M(r)X (0)

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 77 / 1

  • Q1

    f (x) =18

    (3x

    ), x = 0,1,2,3 (discrete)

    MX (t) = E [etX ] =18

    3x=0

    etx(

    3x

    )=

    18(1 + 3et + 3e2t + e3t

    ) = M(1)X (0) =

    32, 2 = M

    (2)X (0) = 3 2 =

    34

    Q2 Suppose that the moment generating function of a random variable X isgiven by M(t) = e3(e

    t1). What is P{X < 2}?

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 78 / 1

  • Properties

    Let a and b be constants, we have

    1. MX+a(t) = E [et(X+a)] = eatMX (t)

    2. MbX (t) = E [etbX ] = MX (tb)

    3. M X+ab

    (t) = E[et( X+a

    b)]

    = eab tMX

    ( tb

    )

    {Especially useful when a = , b = . }4. When X is independent of Y , then

    MX+Y (t) = MX (t) MY (t)

    Eg: Get the pmf or pdf of X + Y if X and Y are independent

    I binomial r.v.s with parameters (n,p) and (m,p), respectively.I Poisson r.v.s with parameters 1 and 2, respectively.I normal r.v.s with parameters (1, 21), (

    22,

    22), respectively.

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 79 / 1

  • Key functionsr .v . X cdf pmf /pdf MGFSurvival function: usually denoted SX (x), F (x) or S(x).

    S(x) = P(X > x) = 1 F (x)

    Hazard rate function: also known as force of mortality and failure rate, andusually denoted (t), h(t), or hT (t).

    hX (x) =fX (x)SX (x)

    NB: When X is continuous,

    h(x) =f (x)

    1 F (x) = S(x)S(x)

    = d lnS(x)dx

    .

    NB:S(x) = e

    x0 h(y)dy .

    AMA528 (By Dr. Catherine Liu) Chapter 1 R.V., Distribution, & Related Issues 1-14/09/2014 80 / 1

    Outline Probabilityr.v.s Discrete r.v.s continuous r.v.s U Normal ExpMomentsQuantilesMGFKey functions