1 / 48

CS433: Modeling and Simulation

Al-Imam Mohammad bin Saud University. Lecture 03: Probability Review. CS433: Modeling and Simulation. Dr. Anis Koubâa. 09 October 2010. Goals of today. Review the fundamental concepts of probability Understand the difference between discrete and continuous random variable. Topics.

ivansmith
Télécharger la présentation

CS433: Modeling and Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Al-Imam Mohammad bin Saud University Lecture 03: Probability Review CS433: Modeling and Simulation Dr. Anis Koubâa 09 October 2010

  2. Goals of today • Review the fundamental concepts of probability • Understand the difference between discrete and continuous random variable

  3. Topics • Fundamental Laws of Probability • Discrete Random Variable • Probability Mass Function (PMF) • Continuous Random Variable • Probability Density Function (PDF) • Cumulative Distribution Function (CDF) • Mean and Variance

  4. Probability Review

  5. Fundamentals • We measure the probability for Random Events • How likely an event would occur • The set of all possible events is called Sample Space • In each experiment, an event may occur with a certain probability (Probability Measure) • Example: • Tossing a dice with 6 faces • The sample space is {1, 2, 3, 4, 5, 6} • Getting the Event « 2 » in on experiment has a probability 1/6

  6. Probability • The probability of every set of possible events is between 0 and 1, inclusive. • The probability of the whole set of outcomes is 1. • Sum of all probabilityisequal to one • Example for a dice: P(1)+P(2)+P(3)+ P(4)+P(5)+P(6)=1 • If A and B are two events with no common outcomes, then the probability of their union is the sum of their probabilities. • Event E1={1}, • Event E2 ={6} • P(E1 U E2)=P(E1)+P(E2)

  7. Complementary Event • Complementary Event of A is not(A) • P(A)=1-P(not A) • The probability that event A will not happen is 1-P(A). • Example • Event E1={1} • Probability to get a value different from {1} is 1-P(E1).

  8. Joint Probability • Event Union (U = OR) Event Intersection (∩= AND) • Joint Probability (A ∩ B) • The probability of two events in conjunction. It is the probability of both events together. • Independent Events • Two events A and B are independent if

  9. Example on Independence E1: Drawing Ball 1 E2: Drawing Ball 2 E3: Drawing Ball 3 P(E1): 1/3 P(E2):1/3 P(E3): 1/3 Case 1: Drawing with replacement of the ball The second draw is independent of the first draw 1 2 3 Case 2: Drawing without replacement of the ball The second draw is dependent on the first draw Quiz: Show that in Case 2, we have

  10. Conditional Probability • Conditional Probability p(A|B) is the probability of some event A, given the occurrence of some other event B. • If A and B are independent, then and • If A and B are independent, the conditional probability of A, given B is simply the individual probability of A alone; same for B given A. • p(A) is the prior probability; • p(A|B) is called a posterior probability. • Once you know B is true, the universe you care about shrinks to B.

  11. Example on Independence E1: Drawing Ball 1 E2: Drawing Ball 2 E3: Drawing Ball 3 P(E1): 1/3 P(E2):1/3 P(E3): 1/3 Case 1: Drawing with replacement of the ball The second draw is independent of the first draw 1 2 3 Case 2: Drawing without replacement of the ball The second draw is dependent on the first draw

  12. Baye’s Rule • We know that • Using Conditional Probability definition, we have • The Bayes rule is:

  13. Law of Total Probability • In probability theory, the law of total probability means the prior probability of A, P(A), is equal to the expected value of the posterior probability of A. • That is, for any random variable N, • where p(A|N) is the conditional probability of A given N.

  14. Law of Total Probability • Law of alternatives: The term law of total probability is sometimes taken to mean the law of alternatives, which is a special case of the law of total probability applying to discrete random variables. • if { Bn : n = 1, 2, 3, ... } is a finite partition of a probability space and each set Bn is measurable, then for any event A we have or, alternatively, (using Rule of Conditional Probability)

  15. Example: Law of Total Probability Sample Space Partitions Event Law of Total Probability

  16. Five Minutes Break You are free to discuss with your classmates about the previous slides, or to refresh a bit, or to ask questions. Administrative issues Groups Formation (mandatory to do it this week)

  17. A random variable • Random variable is a measurable function from a sample space of events  to the measurable space S of values of possible values of the variable Event Value Each value/event has a probability of occurrence

  18. A random variable • Random Variable is also know as stochastic variable. • A random variable is not a variable. It is a function. It maps from the sample space to the real numbers. • random variable is defined as a quantity whose values are random and to which a probability distribution is assigned.

  19. A random variable: Examples. • The number of packets that arrives to the destination • The waiting time of a customer in a queue • The number of cars that enters the parking each hour • The number of students that succeed in the exam

  20. Random Variable Types • Discrete Random Variable: • possible values are discrete (countable sample space, Integer values) • Continuous Random Variable: • possible values are continuous (uncountable space, Real values)

  21. Discrete Random Variable • The probability distribution for discrete random variable is called Probability Mass Function (PMF). • Properties of PMF • Cumulative Distribution Function (CDF) • Mean value and

  22. Discrete Random Variable • Mean (Expected) value • Variance General Equation For Discrete RV

  23. Discrete Random Variable: Example • Random Variable: Grades of the students Probability Mass Function PDF Grade

  24. Discrete Random Variable: Example • Random Variable: Grades of the students Probability Mass Function Property CDF Cumulative Distribution Function Grade

  25. Discrete Random Variable: Example • Random Variable: Grades of the students The Mean Value

  26. Continuous Random Variable • The probability distribution for continuous random variable is called Probability Density Function (PDF). • The probability of a given value is always 0 • The sample space is infinite • For continuous random variable, we compute • Properties of PDF

  27. Continuous Random Variable • Cumulative Distribution Function (CDF) • Mean/Expected value • Variance and

  28. Discrete versus Continuous Random Variables Discrete Random Variable Continuous Random Variable Finite Sample Space e.g. {0, 1, 2, 3} Infinite Sample Space e.g. [0,1], [2.1, 5.3] Probability Mass Function (PMF) Probability Density Function (PDF) Cumulative Distribution Function (CDF)

  29. Continuous Random Variables: Example Example: modeling the waiting time in a queue • People waiting for service in bank queue • Time is a continuous random variable • Random Time is typically modeled as exponential distribution •  is the mean value Exponential Distribution Exp (µ)

  30. Continuous Random Variables: Example • We assume that with average waiting time of one customer is 2 minutes PDF: f (time) time

  31. Continuous Random Variables: Example • Probability that the customer waits exactly 3 minutes is: • Probability that the customer waits between 2 and 3 minutes is: • The Probability that the customer waits less than 2 minutes CDF CDF

  32. Continuous Random Variables: Example Expected Value and Variance • The mean of life of the previous device is: • To compute variance of X, we first compute E(X2): • Hence, the variance and standard deviation of the device’s life are:

  33. Two Minutes Break You are free to discuss with your classmates about the previous slides, or to refresh a bit, or to ask questions. Administrative issues Groups Formation (mandatory to do it this week)

  34. Variance • The standard deviation is defined as the square root of the variance, i.e.:

  35. Coefficient of Variation • The Coefficient of Variance of the random variable X is defined as:

  36. End of lecture There are some additional slides afterwards that may help to explain some concepts

  37. Discrete Probability Distribution • The probability distribution of a discrete random variable is a list of probabilitiesassociated with each of its possible values. • It is also sometimes called the probability function or the probability mass function (PMF)for discrete random variable.

  38. Probability Mass Function (PMF) • Formally • the probability distribution orprobability mass function (PMF)of a discrete random variable X is a function that gives the probability p(xi)that the random variable equals xi, for each value xi: • It satisfies the following conditions:

  39. Continuous Random Variable • A continuous random variable is one which takes an infinite number of possible values. • Continuous random variables are usually measurements. • Examples include height, weight, the amount of sugar in an orange, the time required to run a mile.

  40. Probability Density Function (PDF) • For the case of continuous variables, we do not want to ask what the probability of "1/6" is, because the answer is always 0... • Rather, we ask what is the probability that the value is in the interval (a,b). • So for continuous variables, we care about the derivative of the distribution function at a point (that's the derivative of an integral). This is called a probability density function (PDF). • The probability that a random variable has a value in a set A is the integral of the p.d.f. over that set A.

  41. Probability Density Function (PDF) • The Probability Density Function (PDF)of a continuous random variable is a function that can be integrated to obtain the probability that the random variable takes a value in a given interval. • More formally, the probability density function, f(x), of a continuous random variable X is the derivative of the cumulative distribution function F(x): • Since F(x)=P(X≤x), it follows that:

  42. Cumulative Distribution Function (CDF) • The Cumulative Distribution Function (CDF) is a function giving the probability that the random variable X is less than or equal to x, for every value x. • Formally • the cumulative distribution function F(x) is defined to be:

  43. Cumulative Distribution Function (CDF) • For a discrete random variable, the cumulative distribution function is found by summing up the probabilities as in the example below. • For a continuous random variable, the cumulative distribution function is the integral of its probability density function f(x).

  44. Cumulative Distribution Function (CDF) • Example • Discrete case: Suppose a random variable X has the following probability mass function p(xi): • The cumulative distribution function F(x) is then:

  45. Mean or Expected Value

  46. Example: Mean and variance • When a die is thrown, each of the possible faces 1, 2, 3, 4, 5, 6 (the xi's) has a probability of 1/6 (the p(xi)'s) of showing. The expected value of the face showing is therefore: µ = E(X) = (1 x 1/6) + (2 x 1/6) + (3 x 1/6) + (4 x 1/6) + (5 x 1/6) + (6 x 1/6) = 3.5 • Notice that, in this case, E(X) is 3.5, which is not a possible value of X.

  47. Variance • The variance is a measure of the 'spread' of a distribution about its average value. • Variance is symbolized by V(X) or Var(X) or σ2. • The mean is a way to describe the location of a distribution, • the variance is a way to capture its scale or degree of being spread out. The unit of variance is the square of the unit of the original variable.

  48. Variance • The Variance of the random variable X is defined as: • where E(X) is the expected value of the random variable X. • The standard deviation is defined as the square root of the variance, i.e.:

More Related