Discrete Mathematics and Probability Theory Fall 2015 Jean Walrand 15A Discussion Solutions

Similar documents
ECE Lecture #9, Part 1

4. What is the probability that the two values differ by 4 or more in absolute value? There are only six

HW7 Solutions. f(x) = 0 otherwise. 0 otherwise. The density function looks like this: = 20 if x [10, 90) if x [90, 100]

Formalizing Probability. Choosing the Sample Space. Probability Measures

Lecture 8 : The Geometric Distribution

Exam 1 Review With Solutions Instructor: Brian Powers

Probability Review. Yutian Li. January 18, Stanford University. Yutian Li (Stanford University) Probability Review January 18, / 27

Great Theoretical Ideas in Computer Science

Probability in Programming. Prakash Panangaden School of Computer Science McGill University

CS 361: Probability & Statistics

The Addition Property of Equality states that You can add the same number to both sides of an equation and still have an equivalent equation.

9. DISCRETE PROBABILITY DISTRIBUTIONS

SDS 321: Introduction to Probability and Statistics

1 Review of Probability

Lecture 02: Summations and Probability. Summations and Probability

Deep Learning for Computer Vision

f (1 0.5)/n Z =

Baye s theorem. Baye s Theorem Let E and F be two possible events of an experiment, then P (F ) P (E F ) P (F ) P (E F ) + P (F ) P (E F ).

Discrete Probability Distribution Tables

STAT 516: Basic Probability and its Applications

Exponential Distribution and Poisson Process

Probability and Probability Distributions. Dr. Mohammed Alahmed

BASICS OF PROBABILITY CHAPTER-1 CS6015-LINEAR ALGEBRA AND RANDOM PROCESSES

Random Variables. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

1 INFO 2950, 2 4 Feb 10

Guidelines for Solving Probability Problems

SDS 321: Introduction to Probability and Statistics

Single Maths B: Introduction to Probability

Practice Questions for Final

Useful for Multiplication Rule: When two events, A and B, are independent, P(A and B) = P(A) P(B).

Information and Entropy. Professor Kevin Gold

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

the amount of the data corresponding to the subinterval the width of the subinterval e x2 to the left by 5 units results in another PDF g(x) = 1 π

Disjointness and Additivity

Chapter 7 Probability Basics

1 Probability theory. 2 Random variables and probability theory.

Review Basic Probability Concept

Week 3 Sept. 17 Sept. 21

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley

Topic 10: Hypothesis Testing

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

Chapter 5. Chapter 5 sections

Math 115 Spring 11 Written Homework 10 Solutions

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 2

CS37300 Class Notes. Jennifer Neville, Sebastian Moreno, Bruno Ribeiro

Student Outcomes. Lesson Notes. Classwork. Opening Exercises 1 3 (5 minutes)

Math Spring Practice for the Second Exam.

Lecture 1: Introduction and probability review

7.1 What is it and why should we care?

Math Review Sheet, Fall 2008

Lecture 1. ABC of Probability

This does not cover everything on the final. Look at the posted practice problems for other topics.

x x 1 0 1/(N 1) (N 2)/(N 1)

MAT 271E Probability and Statistics

Expected Value. Lecture A Tiefenbruck MWF 9-9:50am Center 212 Lecture B Jones MWF 2-2:50pm Center 214 Lecture C Tiefenbruck MWF 11-11:50am Center 212

Probability II: Binomial Expansion v2.1/05. Introduction. How to do a problem. Prerequisite: Probability I & Sex Inheritance

Lecture 11. Probability Theory: an Overveiw

Introduction to Stochastic Processes

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

STEP Support Programme. Statistics STEP Questions: Solutions

Some Basic Concepts of Probability and Information Theory: Pt. 1

M378K In-Class Assignment #1

Joint Probability Distributions and Random Samples (Devore Chapter Five)

Probability as Logic

Chapter 4 Population and Economic Growth

P (E) = P (A 1 )P (A 2 )... P (A n ).

Recitation 2: Probability

Recursive Estimation

Math 480 The Vector Space of Differentiable Functions

Test Booklet. Subject: MA, Grade: 11 Algebra 2 honors sample benchmark questions. Student name:

MTHSC 3110 Section 1.1

REVIEW OF MAIN CONCEPTS AND FORMULAS A B = Ā B. Pr(A B C) = Pr(A) Pr(A B C) =Pr(A) Pr(B A) Pr(C A B)

Chapter 2. Conditional Probability and Independence. 2.1 Conditional Probability

Probabilistic Systems Analysis Spring 2018 Lecture 6. Random Variables: Probability Mass Function and Expectation

Probability Distributions

Basics on Probability. Jingrui He 09/11/2007

It applies to discrete and continuous random variables, and a mix of the two.

The n th moment M n of a RV X is defined to be E(X n ), M n = E(X n ). Andrew Dabrowski

16.4. Power Series. Introduction. Prerequisites. Learning Outcomes

Review: mostly probability and some statistics

Discrete Mathematics and Probability Theory Fall 2015 Note 20. A Brief Introduction to Continuous Probability

Review of Probability Theory

8.6 Translate and Classify Conic Sections

Random Variables. Will Perkins. January 11, 2013

Intro to probability concepts

Probability. Lecture Notes. Adolfo J. Rumbos

PROBABILITY: CONDITIONING, BAYES THEOREM [DEVORE 2.4]

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

STAT 430/510: Lecture 16

Introduction and basic definitions

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 25. Minesweeper. Optimal play in Minesweeper

Markov localization uses an explicit, discrete representation for the probability of all position in the state space.

Lecture Notes 1 Probability and Random Variables. Conditional Probability and Independence. Functions of a Random Variable

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring

Lecture Notes 1 Probability and Random Variables. Conditional Probability and Independence. Functions of a Random Variable

2 Chapter 2: Conditional Probability

MAS1302 Computational Probability and Statistics

Expectation and Variance

Basics of Stochastic Modeling: Part II

Statistics 100A Homework 5 Solutions

Transcription:

CS 7 Discrete Mathematics and Probability Theory Fall 25 Jean Walrand 5A Discussion Solutions. James Bond James Bond is imprisoned in a cell from which there are three possible ways to escape: an airconditioning duct, a sewer pipe and the door (which is unlocked). The air-conditioning duct leads him on a two-hour trip whereupon he falls through a trap door onto his head, much to the amusement of his captors. The sewer pipe is similar but takes five hours to traverse. Each fall produces amnesia and he is returned to the cell immediately after each fall. Assume that he always immediately chooses one of the three exits from the cell with probability 3. On average, how long does it take before he opens the unlocked door and escapes? Answer: Due to the memorylessness of the scenario, i.e., what James Bond chose in the previous attempt has nothing to do with his current attempt and all the following attempts, it is like starting all over again, as every attempt is just like his first attempt. Let X be the random variable of the amount of time he needs to escape. We can start by considering the outcome of Bond s first attempt, and see how the expected time to escape, E[X], changes as a result of this. We have E[X] = E[X A]Pr[A] + E[X S]Pr[S] + E[X D]Pr[D] = (E[X A] + E[X S] + E[X D]) 3 where E[X A] means the expected time to escape given that Bond went through the AC-duct in his first attempt, and similarly for E[X S] and E[X D]. Now we take a closer look at these conditional expectations. Clearly, E[X D] = because Mr. Bond escapes immediately. Meanwhile, we have E[X A] = 2 + E[X] because given that 7 chose AC-duct in his first attempt, he wastes 2 hours and have to try again (which triggers another completely fresh attempt with no memory and thus takes E[X] hours to escape). Similarly, we have E[X S] = 5 + E[X]. So now, we have derived a recursive relation for the expected time to escape E[X] = (2 + E[X] + 5 + E[X] + ) 3 Solving this for E[X], we get that E[X] = 7. 2. Family Planning Mr and Mrs Brown decide to continue having children until they either have their first girl or until they have five children. Assume that each child is equally likely to be a boy or a girl, independent of all other children, and that there are no multiple births. Let B and G denote the numbers of boys and girls respectively that the Browns have. Let C be the total number of children they have. (a) Write down the sample space together with the probability of each sample point. CS 7, Fall 25, 5A Discussion Solutions

Answer: The sample space in this problem is the set of all possible sequences of children that the Browns can have; we enumerate them to get: Ω = {g,bg,bbg,bbbg,bbbbg,bbbbb} The probabilities of all of these sample points are as follows: Pr[g] = 2 Pr[bg] = Pr[bbg] = Pr[bbbg] = Pr[bbbbg] = Pr[bbbbb] = ( ) 2 = 2 4 ( ) 3 = 2 8 ( ) 4 = 2 6 ( ) 5 = 2 ( ) 5 = 2 (b) Write down the distributions of the random variables B,G and C. Answer: First, let us think about what values B, G, and C can take on. Looking at our sample space, we see that the possible values for G are and, the possible values for B range between and 5, and finally, the possible values for C range between and 5. To list the distributions, we need to find the probabilities of all of these happenings. We can just read off this information from what we have above. First, we calculate the distribution for G: Pr[G = ] = Pr[bbbbb] = Pr[G = ] = Pr[g] + Pr[bg] + Pr[bbg] + Pr[bbbg] + Pr[bbbbg] = 3 Next we calculate the distribution for B: Pr[B = ] = Pr[g] = 2 Pr[B = ] = Pr[bg] = 4 Pr[B = 2] = Pr[bbg] = 8 Pr[B = 3] = Pr[bbbg] = 6 Pr[B = 4] = Pr[bbbbg] = Pr[B = 5] = Pr[bbbbb] = CS 7, Fall 25, 5A Discussion Solutions 2

Finally the distribution of C, the total number of children is: Pr[C = ] = Pr[g] = 2 Pr[C = 2] = Pr[bg] = 4 Pr[C = 3] = Pr[bbg] = 8 Pr[C = 4] = Pr[bbbg] = 6 Pr[C = 5] = Pr[bbbbg] + Pr[bbbbb] = 2 = 6 (c) Write down the joint distribution of G and C. Answer: Here is a table giving the joint distribution of G and C. G = Joint distribution of G and C C = C = 2 C = 3 C = 4 C = 5 Pr[g] = Pr[bg] = Pr[bbg] = Pr[bbbg] = Pr[bbbbg] = 2 4 G = 8 6 Pr[bbbbb] = (d) Write down the conditional distributions of C given G = i for all possible values i that G can take on. Answer: We need to give both the conditional distribution of C given G =, and the conditional distribution of C given G =. In the first case, we have Pr[C G = ] = Pr[C G = ] Pr[G = ] = Pr[C G = ] 3 based on Bayes rule, and plugging in Pr[G = ] from (b). But this means the conditional distribution of C given G = is just the distribution given in the top row of (d), with all the values divided by 3. In other words, to condition on the event that we get an event from the top row, as opposed to from either row, we just normalize all the probabilities in the top row so they add up to. Thus, we have Conditional distribution of C given G = G = 6 3 C = C = 2 C = 3 C = 4 C = 5 8 3 Similarly, Pr[C G = ] = Pr[C G=] Pr[G=] = Pr[C G=], so we can think of taking the bottom row of the table in (d), multiplied by a normalization factor of. So we have 4 3 2 3 Conditional distribution of C given G = 3 C = C = 2 C = 3 C = 4 C = 5 G = CS 7, Fall 25, 5A Discussion Solutions 3

In the second case, knowing that no girls are born means the Browns stop trying after having C = 5 children. 3. Continuous Probability Let X be a continuous r.v. with probability density function of the form : f (x) = ce λ x, < x < + (a) Can λ take on any arbitrary value? If so, explain. If not, specify the possible values λ can take on. No. We need λ <. Otherwise, we would have an infinite area under the curve f (x) over the range < x < +. This is very easy to check: just over the range < x < +, f (x) = ce λx, with infinite area under the curve unless λ <. (b) Sketch the probability density function..5.5.5 5 5 (c) Given a particular λ, can c take on any arbitrary value? If so, explain. If not, specify the possible values that c can take on (in terms of λ). No. For f (x) to be a valid pdf, it must be normalized so that f (x)dx =. Thus we have ce λ x dx = ce λ( x) dx + ce λx dx 2 ce λx dx = 2c λ eλx = c = λ 2. ] + = 2c λ = (d) Evaluate P[X = 2]. It is zero. There is zero probability of a continuous random variable taking a specific real number value. CS 7, Fall 25, 5A Discussion Solutions 4

(e) Evaluate the mean of X. By symmetry, we see that the mean of X is zero, as the pdf is a symmetric function about X =. In other words, there is equal density at any X = k as at X = k. We could also double check the math: E[X] = ce λ x xdx = ce λ( x) xdx + ce λx xdx = ce λx xdx + ce λx xdx =. CS 7, Fall 25, 5A Discussion Solutions 5