1 / 65

Random Variable

Random Variable. Martina Litschmannová m artina.litschmannova @vsb.cz K210. -3. -2. -1. 1. 0. 2. 3. Random Variable. A random variable is a function or rule that assigns a number to each outcome of an experiment.

maddox
Download Presentation

Random Variable

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. RandomVariable Martina Litschmannová martina.litschmannova@vsb.cz K210

  2. -3 -2 -1 1 0 2 3 RandomVariable • A random variable is a function or rule that assigns a number to each outcome of an experiment. • Basically it is just a symbol that represents the outcome of an experiment.

  3. RandomVariable • A random variable is a function or rule that assigns a number to each outcome of an experiment. • Basically it is just a symbol that represents the outcome of an experiment. Forexample: • X = number of heads when the experiment is flipping a coin 20 times. • R= the number of miles per gallon you get on your auto during a family vacation. • Y = the amount of medication in a blood pressure pill. • V = the speed of an auto registered on a radar detector.

  4. TypesofRandomVariable

  5. DiscreteRandomVariable • usually count data [Number of] • one that takes on a countable number of values –this means you can sit down and listall possible outcomes without missing any, although it might take you an infinite amount of time. Forexample: • X = values on the roll of two dice: X has to be either 2, 3, 4, …, or 12. • Y = number of accidents in Ostrava during a week: Y has to be 0, 1, 2, 3, 4, 5, 6, 7, 8, ……………”real big number”

  6. ContinuousRandomVariable • usually measurement data [time, weight, distance, etc] • one that takes on an uncountable number of values – this means you can never list all possible outcomes even if you had an infinite amount of time. Forexample: • time it takes you to drive home from class: X > 0, might be 30.1 minutes measured to the nearest tenth but in reality the actual time is 30.10000001…………………. minutes. Exercise: try to list all possible numbers between 0 and 1.

  7. Probability distribution • A probability distribution (probability massfunction, cumulativedistributionfunctionordensity function) is a table, formula, or graph that describes the values of a random variable and the probability associated with these values. • An upper-case letter will represent the name of the random variable, forexampleX. • Its lower-case counterpart, x, will represent the value of the random variable.

  8. Probability DistributionofDiscreteRandomVariable

  9. Probability mass (density) function • A set of probability value assigned to each of the values taken by the discrete random variable • and • Probability :

  10. Probability massfunction Forexample: X = number of heads in 3flips of unfair coin (P(H)=0,1) • The probability that the random variable X will equal x is:

  11. Developing Probability MassFunction Probability MassFunction can be estimated from relative frequencies. Consider the discrete (countable) number of televisions per household (X) from US survey data. 1218 /101501 = 0,012 e.g.

  12. What is the probability there is at least one television but no more than three in any given household?

  13. What is the probability there is at least one television but no more than three in any given household?

  14. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • RandomVariable: X … # Sales made in 3 Attemts • Let S denote closing a sale. Probability of closing a saleis. • Thus is not closing a sale, and Seems reasonable to assume that sales are independent.

  15. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • Sample space … list ofpossibleoutcomes 128 128

  16. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • X … # Sales made in 3 Attemts 128 128

  17. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • X … # Sales made in 3 Attemts 128 128

  18. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • X … # Sales made in 3 Attemts 128 128

  19. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • X … # Sales made in 3 Attemts 128 128

  20. A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? • X … # Sales made in 3 Attemts 128 128

  21. P(S)=,2 P(S)=,2 P(F)=,8 P(S)=,2 P(S)=,2 P(F)=,8 P(F)=,8 P(S)=,2 P(S)=,2 P(F)=,8 P(F)=,8 P(S)=,2 P(F)=,8 P(F)=,8 A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? Sales Call 2 Sales Call 1 Sales Call 3 S SS S SF S FS S FF FS S FS F FFS FFF • X P(x) • ,23= .008 • 3(,032)=.096 • 3(,128)=.384 • 0 ,83 = .512

  22. CumulativeDistributionFunctionF(x) CDF is probability thatrandomvariableXislessthanrealnumberx.

  23. CumulativeDistributionFunctionF(x) CDF is probability thatrandomvariableXislessthanrealnumberx. Properties of the distribution function: • isnondecreasing, • iscontinousfromtheleft, • („start“ in 0), • („finished“ in 1).

  24. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x)

  25. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x) • Pointsofdiscontinuityof F(x) are points, where P(x) isnonzero.

  26. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x) • Pointsofdiscontinuityof F(x) are points, where P(x) isnonzero.

  27. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x) • Pointsofdiscontinuityof F(x) are points, where P(x) isnonzero.

  28. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x) • Pointsofdiscontinuityof F(x) are points, where P(x) isnonzero.

  29. Relationshipbetweenp.d.f. P(x) and c.d.f. F(x) • Pointsofdiscontinuityof F(x) are points, where P(x) isnonzero.

  30. Relationship between P(x) and F(x)

  31. Relationship between P(x) and F(x) • Probability distributionfunction P(x) isnonzeroifCumulativedistributionfunctionis not continous.

  32. If a coin is tossed three times, the number of heads obtained can be 0, 1, 2 or 3. The probabilities of each of these possibilities can be tabulated as shown: Specify CumulativeDistributionFunction.

  33. CumulativedistributionfunctionofrandomvariableXis:. Specify Probability MassFunction.

  34. Probability DistributionofContinousRandomVariable

  35. Probability Density Function • Unlike a discrete random variable, a continuous random variable is one that can assume an uncountable number of values. • We cannot list the possible values because there is an infinite number of them. • Because there is an infinite number of values, the probability of each individual value is virtually 0. X … continousrandomvariable

  36. Point Probabilities are Zero • because there is an infinite number of values, the probability of each individual value is virtually 0. • Thus, we can determine the probability of a range of values only. • E.g. with a discrete random variable like tossing a die, it is meaningful to talk about P(X=5), say. • In a continuous setting (e.g. with time as a random variable), the probability the random variable of interest, say task length, takes exactly 5 minutes is infinitesimally small, hence P(X=5) = 0. It is meaningful to talk about P(X ≤ 5).

  37. Probability Density Function f(x) A function f(x) is called a probability density function (over the range a ≤ x ≤ b if it meets the following requirements: • f(x) ≥ 0 for all x between a and b, and • The total area under the curve between a and b is 1.0 f(x) area=1 a b x

  38. Relationshipbetween probability densityfunction f(x) and distributionfunction F(x)

  39. Relationshipbetween probability densityfunction f(x) and distributionfunction F(x)

  40. Relationshipbetween probability densityfunction f(x) and distributionfunction F(x)

  41. X is a continuous random variable with probability density function given by f(x) = 2x for 0 ≤ x ≤ 1.Specifycumulativedistributionfunction.

  42. X is a continuous random variable with cumulativedistributionfunctiongiven by:Specify probability densityfunction f(x).

  43. Relationshipbetween probability, p.d.f. f(x) and c.d.f. F(x) • = • If the random variable X is continuous, it is possible in the above inequality interchanged symbols sharp and unsharpinequality.

  44. Numerical Characteristics of Random Variable

  45. ExpectedValue E(X) • The expected value of a random variableXis the weighted average of all possible values that this random variable can take on. • The weights used in computing this average correspond to the probabilities in case of a discrete random variable, or densities in case of a continuous random variable. DiscreteRandomVariable: ContinousRandomVariable:

  46. Laws of Expected Value The expected value of a constant (c) is just the value of the constant. The expected value of a random variable plus a constant is the expected value of the random variable plus the constant The expected value of a constant times a random variable is the constant times the expected value of the random variable.

  47. Laws of Expected Value • +…+

  48. If a coin is tossed three times, the number of heads obtained can be 0, 1, 2 or 3. The probabilities of each of these possibilities can be tabulated as shown: CalculateexpectedvalueofrandomvariableX.

  49. X is a continuous random variable with probability density function given by f(x) = 2x for 0 ≤ x ≤ 1.CalculateexpectedvalueofrandomvariableX.

  50. Variance (Dispersion) D(X) • The variance is a measure of how far a set of numbers is spread out. It is one of several descriptors of a probability distribution, describing how far the numbers lie from the mean (expected value). DiscreteRandomVariable: ContinousRandomVariable:

More Related