This preview shows pages 1–10. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 COMP170 Discrete Mathematical Tools for Computer Science Discrete Math for Computer Science K. Bogart, C. Stein and R.L. Drysdale Section 5.4, pp. 249262 Random Variables Version 2.0: Last updated, May 13, 2007 Slides c 2005 by M. J. Golin and G. Trippen 2 Random Variables • What Are Random Variables? • Binomial Probabilities • Expected Values • Expected Values of Sums and Numerical Multiples • Indicator Random Variables • The Number of Trials until a First Success 3 Flipping a coin n times. Sample space: set of all sequences of n H ’s and T ’s. What Are Random Variables? A random variable for an experiment with sample space S is a function that assigns a number to each element of S . Example Random variable “number of heads” takes a sequence and tells us how many heads are in that sequence. Example: X ( HTHHT ) = 3 . X ( THTHT ) = 2 . 4 Example 2: Rolling two dice Random variable is “sum of the values showing on top of dice” . X ( ) = 5 X ( ) = 10 5 Random Variables • What Are Random Variables? • Binomial Probabilities • Expected Values • Expected Values of Sums and Numerical Multiples • Indicator Random Variables • The Number of Trials until a First Success 6 Bernoulli Random Variables A test in which the outcome is either a success or failure . Flipping a coin A head Examples: Answer to an exam question A correct answer A Drug trial A successful treatment Sucesss If such a test has P ( Success ) = p and P ( Failure ) = q = 1 p It is called a Bernoulli trial or Benoulli Random Variable with success probability p 7 Jakob Bernoulli b. 1654, d. 1705 Swiss Mathematician and Scientist. Famous for his work on probability the ory (where Bernoulli trials come from) and calculus. He often collaborated with his brother Johann Bernoulli, another famous mathematician For more information, please see http://en.wikipedia.org/wiki/James Bernoulli 8 Flipping a coin # of heads. We are given an Independent trials process with two outcomes at each stage: success and failure . Examples: Student performance on a test # of correct answers Drug trials # of successful treatments We analyze: probability of exactly k successes in n independent trials with probability p of success on each trial. Such an independent trials process is called a Bernoulli trials process Quantity of Interest Note that this is the sum of Bernoulli Random Variables 9 Suppose we have 5 Bernoulli trials, with probability p success on each trial. What is the probability of By Independence , probability of a sequence of outcomes is product of probabilities of individual outcomes. So, probability of any sequence of 3 successes and 2 failures is p 3 (1 p ) 2 . More generally, in n Bernoulli trials, probability of a given sequence of k successes and n k failures is (a) Success on first 3 trials and failure on last 2?...
View Full
Document
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details