CS 237: Probability in Computing Wayne Snyder Computer Science Department Boston University Lecture 12: Continuous Distributions Uniform Distribution Normal Distribution (motivation)
Discrete vs Continuous Distributions Recall: A Random Variable X is a function from a sample space S into the reals: A random variable is called continuous if Rx is uncountable. What needs to change when working with continuous as opposed to discrete distributions? Recall: The probability of a random experiment such as a spinner outputting any particular, exact real number is 0: 0.0 This result extends to any countable collection of real numbers! 0.75 0.25 So we can only think about intervals: 0.5
Discrete vs Continuous Distributions Because of the anomolies having to do with continuous probability, we need to keep the following important points in mind: (A) The probability function f X does NOT represent the probability of a point in the domain, since as just quoted: therefore we can ONLY work with intervals P(X "), P(X > "), P(a X &), etc. and f X is not as important as the CDF F X. (B) In calculating F X and working with intervals, we can not use discrete sums as we did in the discrete case, but will have to use integrals: (C) The range R X will be all the reals and so we don t specify it each time.
Discrete vs Continuous Distributions Discrete Random Variables The Probability Mass Function of a discrete random variable X is a function from the range of X into R : Continuous Random Variables The Probability Distribution Function of a continuous random variable X is a function from the R to R : such that (i) such that (i) (ii) (ii)
Continuous Distributions Let s clarify these ideas with an example... 0.0 Consider the spinner example from way back when: X = the real number in [0..1) that the spinner lands on 0.75 0.25 The probability density function is: 0.5 Note that the area is 1.0 and for any 0 " 1, we have %(") = 1.0, so it is uniform across [0..1). But clearly P(X = a) = 0.0.
Continuous Distributions Now recall that the ONLY way to deal with continuous probability is to use intervals and to use area (or extent) for the probability. Hence we will calculate probabilities of intervals using the CDF: 0.75 0.75
Continuous Distributions 0.75 0.5
Continuous Distributions Bottom Line: In order to deal with continuous distributions, you have to do integrals... Example: Suppose our PDF looked like this: To calculate the probability of intervals, we need to determine the CDF, which means doing the following integral: So for example,
Continuous Distributions Discrete Random Variables Continuous Random Variables Same for both Discrete and Continuous Random Variables
Uniform Distribution The simplest continuous distribution is one we have seen many times: If X = a random real number uniformly chosen from the interval [a..b] then X is a uniform random variable from a to b, denoted and where
Uniform Distribution
How to approximate the binomial? We have seen that under certain conditions, the Poisson can be used to approximate the binomial: 12
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 13
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 14
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 15
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 16
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 17
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 18
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 19
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 20
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 21
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 22
How to approximate the binomial? When we observe the characteristic shape of the Binomial Distribution B(N,0.5) as N approaches Infinity, we see something interesting: 23
Gaussian Exponential Function The normal distribution is one of a class of Gaussian exponential functions what does that mean? Since both of the continuous distributions we will study (Normal and Exponential) use exponentials, let s think about this a bit... Here is a graph of the exponential function e x, where e = 2.71828... (Euler s Constant): 24
Gaussian Exponential Function Here is a graph of e -x, which flips the function around the Y axis (we will see this very shape again when we study the Exponential Distribution next lecture): 25
Gaussian Exponential Function But we want to make it look like the Binomial Distribution, so it has to be symmetric around the Y axis, so we ll reflect it around the y axis with the absolute value: Graph of e - x : 26
Gaussian Exponential Function Whoops, forgot we hate absolute value, so let s use the square instead, which has the added advantage of eliminating the discontinuity at 0: Graph of e x2 27
Gaussian Exponential Function By adding parameters to adjust the height and the width, we have the Gaussian Exponential Function: This function is widely used to describe phenomena (light, electric charge, gravity, quantum probabilities) that decrease in effect with distance, to create filters in signal processing (e.g., audio programming, graphics), etc., in addition to their wide use in statistics and probability... 28
By using parameters to fit the requirements of probability theory (e.g., that the area under the curve is 1.0), we have the formula for the Normal Distribution, which can be used to approximate the Binomial Distribution and which models a wide variety of random phenomena: where! = mean/expected value " = standard deviation " 2 = variance 29
The normal distribution, as the limit of B(N,0.5), occurs when a very large number of factors add together to create some random phenomenon. Example: What is the height of a human being?
The normal distribution, as the limit of B(N,0.5), occurs when a very large number of factors add together to create some random phenomenon. Example: What is the IQ of a human being?
The normal distribution, as the limit of B(N,0.5), occurs when a very large number of factors add together to create some random phenomenon. Example: What is the distribution of measurement errors?
The normal distribution, as the limit of B(N,0.5), occurs when a very large number of factors add together to create some random phenomenon. Example: Even REALLY IMPORTANT things are normally distributed!