Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 7. Distributions. Probability density and cumulative distribution functions. Poisson and Normal distributions.

Similar presentations


Presentation on theme: "1 Lecture 7. Distributions. Probability density and cumulative distribution functions. Poisson and Normal distributions."— Presentation transcript:

1 1 Lecture 7. Distributions. Probability density and cumulative distribution functions. Poisson and Normal distributions.

2 2 We remind here some facts about the distributions of the discrete and continuous random variable, and also introduce some new concepts. The discrete random distribution can be characterized by a probability function p(x i ) assigning the probabilities to all possible values x i of a random variable X. The probability function should satisfy the following equations : For those familiar with the concept of -function, this relation can be presented as

3 3 Example: Suppose that a coin is tossed twice, so that the sample space is ={HH,HT,TH,TT}. Let X represent a number of heads that can come up. Find the probability function p(x). Assuming that the coin is fair, we have P(HH)=1/4, P(HT)=P(TH)=1/4, P(TT)=1/4; Then, P(X=0)=P(TT)=1/4; P(X=1)=P(HT TH)=1/4+1/4=1/2. P(X=2)= ¼. The probability function is thus given by the table: x012 p(x)1/41/21/4 The graphical example presented below is a little bit of a stretch and should be used with some care. Why? (Hint: see (7.4))

4 ~p(x i ) 0.3 Possible values of the random variable, x i

5 5 7.1 Poisson distribution - a. Definition Poisson distribution is one of the most important discrete distributions. Its probability function is Poisson distribution is a limiting case of the Binomial distribution P(p n,n), with parameters p n and n such that In other words, if we have a large number of independent events with small probability, then number of occurrences has approximately Poisson distribution.

6 6 Examples with Poisson distribution 1. Suppose that the probability of a defect in a foot of magnetic tape is Use the Poisson distribution to compute the probability that 1500 feet roll will have no defects.

7 7 This example helps to describe the PD in a new way by noticing that L (I use it here instead of Lambda) is the expected (average) value of the defects in 1500 feet of the tape. In other words, the PD gives the probability of n events happening in some particular setting if the average number of events, L, is known.

8 8 Example 2 An airline company sells 200 tickets for a plane with 198 seats, knowing that a probability that a passenger will not show up for the flight is Use the Poisson approximation to compute the probability that they will have enough seats for all the passengers that will show up. Solution. p=0.01, L=0.01*200=2 – the average number (out of 200 passengers ) that wont show up for the flight. p[x]= Exp[-2]2 x /x!; P[more than 1 person wont show up] = 1-p[0]-p[1]= 1 – 3 Exp[-2] =

9 9 Example 3: (working in groups) 10% of the tools produced in a certain manufacturing process turns out to be defective. Find a probability that in a sample of ten tools selected at random, exactly 2 will be defective, by using (a) binomial and (b) Poisson distribution. Open a Mathematica file, and find the probability using (a) and (b).

10 10 Continuous distribution. Probability density function (PDF). Remember: For a continuous variable we must assign to each outcome a probability p(x )=0. Otherwise, we would not be able to fulfill the requirement 7.3. The analogs of Eqs. 7.2 and 7.3 for the continuous distributions would be A random variable X is said to have a continuous distribution with density function f(x) if for all a b we have

11 11 P(E) is a probability that X belongs to E. ab f(x) P(a

12 12 Examples: 1. The uniform distribution on (a,b): We are picking a value at random from (a,b). By direct integration you can verify that (7.7) satisfies the condition (7.5). We can now find PDF which describes the experiment with a spinner Lecture 1). In this case b-a=2, and The probability that the arrow will stop in the rage between and + equals /2.

13 13 2. The exponential distribution Those who know how to integrate can verify that (7.8) satisfies (7.5) (the total area under the curve f(x) equals 1. Note: In Matematica, the integral of a function f[x] (notice that […] rather than (…) is used) can be found as: Integrate[f[x],{x,x 1,x 2 }], Shift+Enter. Here x 1 and x 2 are the limits of integration.

14 14 A typical example of the exponential distribution results from the discussion of the waste products of the nuclear power plant. If at time t=0 there are N(0) identical unstable particles, and the number of particles dN(t) decaying in time dt is proportional to dt and to the number of particles, then we have dN(t)= - N(t)dt This is so called differential equation. Here is how it is solved with Mathematica. As a result we came up with the exponential distribution. DSolve[{n[t] + G n[t] == 0, n[0] == n0},n[t],t]; n[t]-> n0 Exp[-Gt];

15 15 Lets introduce the half-time T, such that N(T)=N 0 /2. Then we find : T=ln2= The standard normal distribution f(x)=(2 ) -1/2 exp(-x 2 /2)(7.12) A. Using Mathematica, check that this PDF satisfies the normality condition (7.5). Make a plot of (7.12). If a random variable y is related to x as y=ax+b, how the distribution function f(y) looks like? (we assume that x is distributed according to (7.12).

16 16 More generally, X is said to have a normal (, 2 ) distribution if it has density function f(x)=(2 2 ) -1/2 exp[-(x- ) 2 /2 2 ](7.12 ) B. Try to analyze, assigning different numeric values to and 2 how they affect the shape of f(x). For instance, how the parameters for the green and red curves are related? Green and blue?

17 17 Probability distribution function ( also called cumulative distribution function= CDF) From the outside, random distributions are well described by the probability distribution function (we will use CDF for short) F(x) defined as This formula can also be rewritten in the following very useful form: 1. Continuous random variable

18 18 To see what the distribution functions look like, we return to our examples. 1. The uniform distribution (7.7): Using the definition (7.13) and Mathematica, try to find F(x) for the uniform distribution. Prove that F(x)=0 for x a; (x-a)/(b-a) for a x b; 1 for x>b. Draw the CDF for several a and b. Consider an important special case a=0, b=1. How is it related to the spinner problem? To the balanced die? 2. The exponential distribution (7.8):

19 19 Use Mathematica to prove that F(x)= 0 for x 0; 1-exp(- x) for x >0. (7.15) Lack of memory for the exponential distribution Suppose that X has an exponential distribution (7.8). The probability that the event (such as the radioactive decay) did not happen in t units of time is P(X>t) = 1-F(x). According to (7.15) it results in P(X>t)= exp(- t). Lets find now a probability that we will have to wait some additional time s given that we have been waiting t units of time: P(T>t+s|T>t) = P(T > T+s)/P(T > t) = exp[- (t+s)]/ exp[- t)]= exp[- s]. As we see, the result depends only on s and does not depend on the previous waiting time. The probability you must wait additional s units of time is the same as if you had not been waiting at all.

20 20 The standard normal distribution Using Mathematica and Eq. (7.12), find F[x] for the snd. Use NIntegrate[f[t],{t,-,x}] and Plot[…] functions. 2. CDF for discrete random variables For discrete variables the integration is substituted for summation: It is clear from this formula that if X takes only a finite number of values, the distribution function looks like a stairway.

21 21 p(x 1 ) p(x 2 ) p(x 3 ) p(x 4 ) x1x1 x2x2 x3x3 x4x4 F(x) x 1 Draw F(x) for the example in page 7.

22 22 C. Suppose that a pair of fair dice are to be tossed, and let the random variable denote the sum of the points. Obtain F(x) for this variable. For the standard normal distribution, find the interval (-a,a) such that P(-a

23 23 Home assignment is in three blue areas marked as A., B. C. and D. D. (1) Find the constant c such that the function f(x) = c x 2 for 0 /2). (4) Read the problem 4.22 in Schaums P&S and find the error in our solution of this problem ( the previous class ). It looks the results with BD and PD are much closer to each other.


Download ppt "1 Lecture 7. Distributions. Probability density and cumulative distribution functions. Poisson and Normal distributions."

Similar presentations


Ads by Google