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
ROHANA BINTI ABDUL HAMID MADAM ROHANA BINTI ABDUL HAMID INSTITUT E FOR ENGINEERING MATHEMATICS (IMK) INSTITUT EMALAYSIA FOR ENGINEERING UNIVERSITI PERLIS MATHEMATICS (IMK) UNIVERSITI MALAYSIA PERLIS Free Powerpoint Templates 2.1Introduction 2.2Discrete probability distribution 2.3Continuous probability distribution 2.4Cumulative distribution function 2.5Expected value, variance and standard deviation In an experiment of chance, outcomes occur randomly. We often summarize the outcome from a random experiment by a simple number. Definition 2.1 A variable is a symbol such as X, Y, Z, x or H, that assumes values for different elements. If the variable can assume only one value, it is called a constant. A random variable is a variable whose value is determined by the outcome of a random experiment. Example 2.1 A balanced coin is tossed two times. List the elements of the sample space, the corresponding probabilities and the corresponding values X, where X is the number of getting head. Solution Elements of sample space HH HT TH TT Probability X ¼ ¼ ¼ ¼ 2 1 1 0 TWO TYPES OF RANDOM VARIABLES Discrete Random Variables A random variable is discrete if its set of possible values consist of discrete points on the number line. Continuous Random Variables A random variable is continuous if its set of possible values consist of an entire interval on the number line. 2.2 DISCRETE PROBABILITY DISTRIBUTIONS Definition 2.3: If X is a discrete random variable, the function given by f(x)=P(X=x) for each x within the range of X is called the probability distribution of X. Requirements for a discrete probability distribution: 1) The probability of each value of the discrete random variable is between 0 and 1, inclusive. That is, 0 P( X x) 1 2) The sum of all the probabilities is 1. That is, P( X x) 1 xS Example 2.2 Check whether the distribution is a probability distribution. x 0 1 2 3 4 P(X=x) 0.125 0.375 0.025 0.375 0.125 Solution All the probabilities between 0 and 1. 4 2. . P( X x) P( X 0) P( X 1) P( X 2) P( X 3) P( X 4) 1. 0 = 0.125+0.375+0.025+0.375+0.125 = 1.025 1 so the distribution is not a probability distribution. Example 2.3 Check whether the function given by x2 f ( x) for x =1,2,3,4,5 25 can serve as the probability distribution of a discrete random variable. Solution 1) The probabilities are between 0 and 1 f(1) = 3/25 , f(2) = 4/25, f(3) =5/25, f(4) = 6/25, f(5)=7/25 Solution 5 1 x2 f ( x) 25 1 = f (1) f (2) f (3) f (4) f (5) 1 2 2 2 3 2 4 2 5 2 = 25 25 25 25 25 3 4 5 6 7 = 25 25 25 25 25 25 = 25 1 5 # so the given function is a probability distribution of a discrete random variable. 2.3 CONTINUOUS PROBABILITY DISTRIBUTIONS Definition 2.4: A function with values f(x), defined over the set of all numbers, is called a probability density function of the continuous random variable X if and only if b P(a X b) f ( x) dx a for any real constant a and b with a b Requirements for a probability density function of a continuous random variable X: 1) f ( x) 0 for - x 2) f ( x) dx 1. That is the total area under graph is 1. Example 2.4 Let X be a continuous random variable with the following 3 2 ( x 1), 0 x 1 f ( x) 4 0, otherwise a) Verify whether this distribution is a probability density function b) Find P (0 X 0.5) c) Find P(0.5 X 2) Answer; The distribution is probability density function if it fulfill the following requirements, 1) All f(x)≥0 2) If a) f ( x)dx 1 In this problem, 1) First requirement f(0)=3/4≥0, f(1)=3/2≥0, f(x)=0, otherwise - All f(x)≥0 Must write the conclusion so that we know the first requirement is fulfill! 2) Second requirement 0 1 3 2 0dx 0 4 ( x 1)dx 1 0dx 3 x3 [ x]10 4 3 3 4 [ ] 4 3 1 - Must write the conclusion so that we know the second requirement is fulfill! f ( x)dx 1 Write last conclusion to answer the question! Since all requirements all fulfill, the distribution is probability density function. b) P(0 X 0.5) 0.5 3 2 ( x 1)dx 4 0 0.5 3 ( x 2 1)dx 40 0 .5 3 3 x x 4 3 0 3 3 0.5 ( 0.5) 0 4 3 0.40625 c) P(0.5 X 2) 1 2 3 2 ( x 1)dx 0dx 4 0.5 1 1 3 2 ( x 1)dx 0 4 0.5 1 3 3 x x 4 3 0 .5 3 1 0.5 ( 1) ( 0.5) 4 3 3 3 3 0.59375 2.4 CUMULATIVE DISTRIBUTION FUNCTION The cumulative distribution function of a discrete random variable X , denoted as F(X), is F ( x) P( X x) f (t ) for x tx For a discrete random variable X, F(x) satisfies the following properties: 1) 0 F ( x) 1 2) If x y, then F ( x) F ( y ) If the range of a random variable X consists of the values x1 x2 x3 ... xn , then f ( x1 ) F ( x1 ) and f ( xi ) F ( xi ) F ( xi 1 ) for i 2, 3,..., n The cumulative distribution function of a continuous random variable X is x F ( x) P( X x) f (t ) dt for x Let F x be the distribution function for a continuous random dF ( x) variable X . Then f ( x) F ( x) dx wherever the derivative exists. Example 2.5 (Discrete random variable) 5 x Given the probability function f ( x) for x 1, 2,3, 4, 10 find F ( x) Solution x 1 2 3 4 f(x) 4/10 3/10 2/10 1/10 F(x) 4/10 7/10 9/10 1 Example 2.6 a.(Continuous random variable) Given the probability density function of a random variable X as follows; 3 2 x , f ( x) 8 0, 0 x2 otherwise Find the cumulative distribution function, F(X) ii) Find P(1 X 2) i) Solution i) Cummulative distribution function, F(X) i) For x 0 , x F ( X ) 0dt 0 ii) For 0 x 2 0 x 3 2 F ( X ) 0dt t dt 8 0 3 t 8 3 x 0 x 8 For x 2 , 0 2 x 3 2 F ( X ) 0dt t dt 0dt 8 0 2 t3 8 2 0 0, 3 x F(X ) , 8 1, 23 1 8 x 0 0 x2 x2 Summary is important!!! Two methods to answer question 3 iii ) P (1 X 2) F (2) F (1) 23 13 8 8 7 8 iii) P (1 X 2) 2 3 2 x dx 8 1 3 3 x 2 [ ]1 8 3 3 3 3 2 1 [ ] 8 3 3 7 8 TRY!!! The lifetime of a computer, in x years, is given by a random variable with the following function. x 4 , 4 x f ( x) , 4 0 0 x2 2 x4 elsewhere a) Verify that the function is probability density function. b) Find the cumulative distribution function of the random variable X. c) Find P(1≤X≤3) 2.5 EXPECTED VALUE, VARIANCE AND STANDARD DEVIATION 2.5.1 Expected Value The mean of a random variable X is also known as the expected value of X as X E ( X ) If X is a discrete random variable, If X is a continuous random variable, 2.5.2 Variance Var ( X ) 2 X2 E (( X ) 2 ), where Var ( X ) ( X ) 2 P ( X x), in the discrete case, xS Var ( X ) 2 ( X ) f ( x)dx , in the continuous case when it exists. Var ( X ) exists if and only if E ( X ) and E ( X 2 ) both exist, and then Var ( X ) E ( X 2 ) ( E ( X )) 2 2.5.3 Standard Deviation The standard deviation is X Var ( X ) X2 2.5.4 Properties of Expected Values • For any constant a and b, i) E (a) a ii) E (bX ) bE ( X ) iii) E (aX b) aE ( X ) b 2.5.5 Properties of Variances For any constant a and b, i) Var (a ) 0 ii) Var (bX ) b Var ( X ) 2 iii) Var (aX b) a 2Var ( X ) Example 2.7 Find the mean, variance and standard deviation of the probability function x f ( x) for x 1, 2,3, 4 10 Solution Mean: n E X x f x i 1 4 x x 10 i 1 1 2 3 4 1 2 3 4 10 10 10 10 30 3 10 Varians: E X 2 x2 f x n i 1 4 x x 10 i 1 2 3 2 1 2 2 2 4 1 2 3 4 10 10 10 10 10 2 Var ( X ) E ( X 2 ) ( E ( X )) 2 10 32 1 X Var ( X ) 1 Example 2.8 Let X be a continuous random variable with the following probability density function 3 x(2 x), 0 x 2 f ( x) 4 0 , otherwise Find a) E ( X ) b) Var ( X ) Answer; a) E (X) = x. f ( x)dx 3 E ( X ) x.0dx x. x(2 x)dx x.0dx 4 0 2 0 2 2 3 x 2 .(2 x)dx 40 3 2 x3 x 4 2 [ ]0 4 3 4 3 4 . 1 4 3 b) Var (X) = E (X2) – (E(X))2 E (X) = 1, 2 2 2 3 E ( X ) x .0dx x . x(2 x)dx x 2 .0dx 4 0 2 0 2 2 3 x 3 .(2 x)dx 40 3 2 x 4 x5 2 [ ]0 4 4 5 3 8 6 . 4 5 5 6 1 2 Var ( X ) (1) 5 5 Exercise 1 A survey asked a sample of people living in Kangar, how many times they shop at The Store supermarket each week and the following distribution is obtained; X 0 1 2 3 4 P(X=x) 0.2 0.35 0.25 0.11 0.09 Does the distribution determine the probability distribution for discrete random variable? b) Find the probability of people shop at The Store more than 2 times. (answer: 0.2) c) Find the mean and variance of number of times people living in Kangar shop at The store supermarket. a) (mean=1.54, variance=1.4084) Exercise 2 A restaurant manager is considering a new location for her restaurant. The projected annual cash flow for the new location is; Annual cash flow Probability $10,000 $30,000 $70,000 $90,000 $100,000 0.10 0.15 0.50 0.15 ????? Given that the distribution is probability distribution, find the expected cash flow for the new location. (E(X)=64 000) Exercise 3 X is a random variable which represents the delay time, in minutes, for a Star Cruise to depart from Pulau Langkawi jetty, with function 0.1 0.005 x, f ( x) 0, 0 x 20 otherwise a) Verify that the function is probability density function. b) Calculate F (X). c) Find E(X) and Var (X). d) Find P(10≤X≤30)