Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Random Variables and Stochastic Processes โ 0903720 Dr. Ghazi Al Sukkar Email: ghazi.alsukkar@ju.edu.jo Office Hours: will be posted soon Course Website: http://www2.ju.edu.jo/sites/academic/ghazi.alsukkar Most of the material in these slide are based on slides prepared by Dr. Huseyin Bilgekul http://faraday.ee.emu.edu.tr/ee571/ 1 Cumulative Distribution Function (CDF) โข Since the elements of S that are contained in the event ๐ โค ๐ฅ changes as the number ๐ฅ takes various values, then ๐ ๐ โค ๐ฅ is a number that depends on ๐ฅ. โข Definition If X is a random variable define over S, then the function F defined on (๏ญ๏ฅ, ๏ฅ) by ๐น๐ ๐ฅ = ๐ ๐ โ ๐: ๐(๐) โค ๐ฅ = ๐(๐ ๏ฃ ๐ฅ) is called the distribution function or cumulative distribution function (CDF) of X. โข The CDF gives a complete description of the random variable. 2 โข Example: In the die experiment, the random variable is such that ๐ ๐๐ = ๐, if the die is fair, then the CDF is a staircase function. โข ๐น 9 =๐ ๐โค9 =๐ ๐ =1 โข ๐น 3 = ๐ ๐ โค 3 = ๐ ๐1 , ๐2 , ๐3 = 3 6 โข ๐น 3 = ๐ ๐ โค 3.4 = ๐ ๐1 , ๐2 , ๐3 = 3 6 3 Properties of CDF Properties 1. 0 โค ๐น๐ (๐ฅ) โค 1 (this follows from Axiom 1 of probability). 2. ๐น๐ (๐ฅ) is nondecreasing, ๐น๐ ๐ฅ1 โค ๐น๐ ๐ฅ2 if ๐ฅ1 < ๐ฅ2 (this is because event ๐ โค ๐ฅ1 โ ๐ โค ๐ฅ2 ). 3. ๐น๐ +โ = 1, since ๐ โค โ = ๐. 4. ๐น๐ โโ = 0, since ๐ โค โโ = โ . 5. If ๐น๐ ๐ฅ๐ = 0 then, ๐น๐ ๐ฅ๐ = 0, โ๐ฅ โค ๐ฅ๐ . 6. ๐ ๐ > ๐ฅ = 1 โ ๐น๐ (๐ฅ), since ๐ โค ๐ฅ โช ๐ > ๐ฅ = ๐ and they are mutually exclusive events. 7. ๐น๐ (๐ฅ) is continuous from the right. lim ๐น๐ (๐ฅ + ๐โ0 ๐>0 4 8. ๐ ๐ฅ1 < ๐ โค ๐ฅ2 = ๐น๐ ๐ฅ2 โ ๐น๐ ๐ฅ1 . since ๐ โค 5 Discrete-Type RV โข ๐ is a discrete RV if ๐น๐ (๐ฅ) is a staircase function โน ๐ฅ๐ is a discontinuity point. โ โข ๐ ๐ = ๐ฅ๐ = ๐น๐ ๐ฅ๐ โ ๐น๐ ๐ฅ๐ = ๐๐ โข ๐น๐ ๐ฅ = ๐๐=โโ ๐๐ , ๐ฅ๐ โค ๐ฅ < ๐ฅ๐+1 โข ๐ ๐๐ = 1 ๐๐ ๐ฅ๐ 6 Continuous-Type RV โข ๐ is a continuous RV if ๐น๐ (๐ฅ) is a continuous function. โ โข ๐น๐ ๐ฅ = ๐น๐ ๐ฅ โน ๐ ๐ = ๐ฅ = 0 7 โข Mixed RV. 8 Percentiles โข The ๐ข percentile of an RV ๐ is the smallest number ๐ฅ๐ข such that: ๐ข = ๐ ๐ โค ๐ฅ๐ข = ๐น๐ (๐ฅ๐ข ) โข ๐ฅ๐ข is the inverse of the function ๐ข = ๐น๐ (๐ฅ) โข The median of ๐ is the smallest number ๐ such that ๐น๐ ๐ = 0.5 โน ๐ ๐๐ ๐กโ๐ 50% percentile of ๐. 9 Example The distribution function of a random variable X is given by ๏ฌ0 ๏ฏx 4 ๏ฏ ๏ฏ F ( x) ๏ฝ ๏ญ 12 ๏ฏ1 x๏ซ 1 2 ๏ฏ 12 ๏ฏ ๏ฎ1 x๏ผ0 0 ๏ฃ x ๏ผ1 1๏ฃ x ๏ผ 2 2๏ฃ x๏ผ3 x๏ณ3 Compute the following quantities๏ผ (a) P(X < 2) (b) P(X = 2) (d) P(X > 3/2) (e) P(X = 5/2) (c) P(1๏ฃ X < 3) (f) P(2<X ๏ฃ 7) 10 Example For the experiment of flipping a fair coin twice, let X be the number of tails and calculate F(t), the distribution function of X, and then sketch its graph. Sol๏ผ ๏ฌ0 ๏ฏ1 / 4 ๏ฏ Ans : F (t ) ๏ฝ ๏ญ ๏ฏ3 / 4 ๏ฏ๏ฎ1 t ๏ผ 0, 0 ๏ฃ t ๏ผ 1, 1 ๏ฃ t ๏ผ 2, t ๏ณ 2. 11 Example Suppose that a bus arrives at a station every day between 10:00 Am and 10:30 AM, at random. Let X be the arrival time; find the distribution function of X, F(t), and then sketch its graph. Sol๏ผ t ๏ผ 10, ๏ฌ0 ๏ฏ Ans : F (t ) ๏ฝ ๏ญ2(t ๏ญ 10) 10 ๏ฃ t ๏ผ 10.5, ๏ฏ1 t ๏ณ 10.5. ๏ฎ 12 Example The sales of a convenience store on a randomly selected day are X thousand dollars, where X is a random variable with a distribution function of the following form๏ผ t ๏ผ0 ๏ฌ0 ๏ฏ1 t 2 0 ๏ฃ t ๏ผ1 ๏ฏ2 F (t ) ๏ฝ ๏ญ 2 k ( 4 t ๏ญ t ) 1๏ฃ t ๏ผ 2 ๏ฏ ๏ฏ t ๏ณ 2. ๏ฎ1 Suppose that this convenience storeโs total sales on any given day are less than $2000. (a) Find the value of k. (b) Let A and B be the events that tomorrow the storeโs total sales are between 500 and 1500 dollars, and over 1000 dollars, respectively. Find P(A) and P(B). (c) Are A and B independent events? 13 Probability Density Function (pdf) โข The pdf is defined as the derivative of the cdf: ๐๐น๐ (๐ฅ) ๐๐ (๐ฅ) โ ๐๐ฅ ๐ฅ โน ๐น๐ ๐ฅ = Since ๐๐น๐ (๐ฅ) ๐๐ฅ = ๐๐ ๐ข ๐๐ข โโ ๐น๐ ๐ฅ+โ๐ฅ โ๐น๐ (๐ฅ) lim โ๐ฅ ๐ฅโ0 โฅ 0, from the monotone-nondecreasing nature of ๐น๐ (๐ฅ), it follows that ๐๐ (๐ฅ) โฅ 0 for all ๐ฅ. 14 โข It follows that: ๐ฅ2 ๐ ๐ฅ1 < ๐ โค ๐ฅ2 = ๐น๐ ๐ฅ2 โ ๐น๐ ๐ฅ1 = ๐๐ ๐ฅ ๐๐ฅ ๐ฅ1 FX (x) 1 โข ๐ ๐ฅ โค ๐ โค ๐ฅ + โ๐ฅ โ ๐๐ (๐ฅ)โ๐ฅ Provided that โ๐ฅ is sufficiently small. x x1 x2 f X (x) x x1 x2 โข The probability that ๐ is in a small interval โ๐ฅ is proportional to ๐๐ (๐ฅ) and it is maximum if that interval contains the point ๐ฅ๐ , where๐๐ (๐ฅ) is maximum. ๐ฅ๐ is called the mode (most likely value of ๐). Note: an RV is called unimodal if it has a single mode. 15 โข Basic properties of pdf: 1. ๐๐ (๐ฅ) โฅ 0. 2. โ ๐ โโ ๐ ๐ฅ ๐๐ฅ = 1. 3. In general, ๐ ๐ โ ๐ด = ๐ด ๐๐ ๐ฅ ๐๐ฅ. 16 Pdf for Discrete Random Variables The pfd for discrete RV is: ๐๐ ๐ฅ = ๐ ๐๐ ๐ฟ(๐ฅ โ ๐ฅ๐ ) It is known as probability mass function (pmf). ๐๐ = ๐ ๐ = ๐ฅ๐ ๐ฅ๐ s represent the discontinuity points. Again: ๐น๐ ๐ฅ = ๐๐=โโ ๐๐ , ๐ฅ๐ โค ๐ฅ < ๐ฅ๐+1 ๐ ๐๐ = 1 f X (x ) pi xi x 17 Example In the experiment of rolling a balanced die twice, let X be the maximum of the two numbers obtained. Determine and sketch the probability mass function and the distribution function of X. Sol๏ผ x ๏ผ 1, ๏ฌ0 ๏ฏ1 / 36 ๏ฏ ๏ฏ4 / 36 ๏ฏ Ans : F ( x) ๏ฝ ๏ญ9 / 36 ๏ฏ16 / 36 ๏ฏ ๏ฏ25 / 36 ๏ฏ ๏ฎ1 1 ๏ฃ x ๏ผ 2, 2๏ฃ x๏ผ3 3 ๏ฃ x ๏ผ 4. 4 ๏ฃ x ๏ผ 5, 5 ๏ฃ x ๏ผ 6, x ๏ณ 6. 18 Example Can a function of the form ๏ฌc( 23 ) x x ๏ฝ 1,2,3,... p ( x) ๏ฝ ๏ญ elsewhere. ๏ฎ 0 be a probability mass function ? Sol๏ผ 19 Example Let X be the number of births in a hospital until the first girl born. Determine the probability mass function and the distribution function of X. Assume that the probability is 1/2 that a baby born is a girl. Sol๏ผ t ๏ผ 1, ๏ฌ0 Ans : F (t ) ๏ฝ ๏ญ n ๏ญ1 1 ๏ญ ( 1 / 2 ) n ๏ญ 1 ๏ฃ t ๏ผ n, n ๏ฝ 2,3,4,๏. ๏ฎ 20