Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 STAT 315 Nutan S. Mishra.

Similar presentations


Presentation on theme: "Chapter 4 STAT 315 Nutan S. Mishra."— Presentation transcript:

1 Chapter 4 STAT 315 Nutan S. Mishra

2 UNiversity of South Alabama
Random variable A random variable is a mapping from set of sample space to the real line. Example: consider the experiment of tossing a coin then S = { H, T} Instead of using H and T we can give the numerical values as X(H) =1 and X(T) =0 Thus we define X as a random variable which takes value one if head shows up and 0 if tail shows up. 12/31/2018 UNiversity of South Alabama

3 UNiversity of South Alabama
Random Variable Consider experiment of tossing a coin then S = {1,2,3,4,5,6} Here we define x= 1,2,3,4,5,6 Random variables are discrete if they take values on a discrete set and are continuous if they take values on an interval. Example: Recording GPA of a student. Here the random variable x takes values on (0,4). Thus x is a continuous random variable. 12/31/2018 UNiversity of South Alabama

4 Probability distribution of a Random Variable
We have seen that corresponding to every sample space we can define a probability distribution. Similarly corresponding to every random variable there is a probability distribution. Example: S = { H,T} x = 0 or 1 Then f denotes the probability distribution f(x)=p(x=0) = ½ and f(x) =p(x=1)= ½ . 12/31/2018 UNiversity of South Alabama

5 Probability distribution
Example: S = {1,2,3,4,5,6} then f(x) =P(x =i) = 1/6 for i = 1,2,3,4,5,6 Example: S = {lemon , good} x(lemon) = 1 x(good) =0 Then f(x)= p(x=1)= .001 f(x) =p(x=0)= .999 this can be written as f(x) = .001 if x=1 = .999 if x=0 12/31/2018 UNiversity of South Alabama

6 Probability distribution
Two properties of probability distribution If f(x) is a probability distribution then f(x)0 for all x and 12/31/2018 UNiversity of South Alabama

7 UNiversity of South Alabama
Exercise 4.5 Given 12/31/2018 UNiversity of South Alabama

8 UNiversity of South Alabama
Exercise 3.1 and 4.1 (x,y) represents the event that the technician finds x suitable solid crystal lasers and y that of carbon dioxide lasers. There are 3 solid crystal lasers and 2 carbon dioxide lasers thus S ={(0,0), (0,1), (0,2), (1,0),(1,1),(1,2), (2,0),(2,1),(2,2),(3,0),(3,1),(3,2)} Z = x+y that is Z is total number of suitable lasers found. Then Z takes values 0,1,2,3,4,5 Value of Z f(Z=z)=P(Z=z) F(z) =P(Z<z) 1/12 1 2/12 3/12 2 6/12 3 9/12 4 11/12 5 12/12 12/31/2018 UNiversity of South Alabama

9 UNiversity of South Alabama
Exercise 4.2 Experiment: tossing four coins |S| = 16, S = { HHHH, HHHT, HHTH,HTHH,THHH, HHTT, HTHT, HTTH, THTH,TTHH, THHT TTTH, TTHT, THTT, HTTT TTTT } Let X(H) =1 and X(T) =0 Let Y = total number of heads in a toss Then Y takes values 0,1,2,3,4 Y =y P(Y =y) /16 /16 /16 /16 /16 12/31/2018 UNiversity of South Alabama

10 Binomial distribution
An experiment is called Bernoulli experiment if it has only two outcomes. Eg tossing a coin, declaring a car lemon or good. Bernoulli experiment is also called Bernoulli trial. P(success) = p and P(failure) = 1-p (or q) Consider the following experiment Take a bernoulli trial Repeat it n times ( conduct n trials) Probability of success remains same in each trial The n trials are independent. Define X = number of successes in n trials. Then x is called Binomial random variable 12/31/2018 UNiversity of South Alabama

11 Binomial distribution
To find the probability distribution of X. Note range of X is 0 to n. We want to find P(X=1), …P(X=n). We find a rule for P(X=x) If there are x successes then there are (n-x) failures attached to the experiment. P(such outcome) = p*p*…xtimes*(1-p)*(1-p)…(n-x) times The x successes can occur in (n choose x ways) Thus P(X=x) = Useful link: 12/31/2018 UNiversity of South Alabama

12 Binomial distribution
Thus for given values of p and n we can find the probabilities of binomial distribution using following formula b(x; n,p) = for x = 0,1,2,…,n B(x; n,p) = 12/31/2018 UNiversity of South Alabama

13 Binomial distribution
Exercise 4.16: Let success s = noise level exceeds 2 db Given that p(s) = p = .05 then q = 1 - p = .95 Given 12 such amplifiers, let X = # s type amplifiers out of 12. Then P(X=1) =(12 choose 1) p1 q11 P(X≤2) = P(X=0)+P(X=1)+P(X=2) =(12choose0)p0q12+(12choose1)p1q11+(12choose2)p2q10 (c) P(X≥2) = 1- P(X<2) = 1- {P(X=0)+P(X=1)} 12/31/2018 UNiversity of South Alabama

14 Binomial distribution
Exercise 4.19 s = jar contains less than claimed amount of coffee. P(s) =p = .10, n = 16 X = # jars found with less coffee Claim is accepted if X<3 i.e X≤ 2 (a) P(acceptance ) = B(2; 16, .05) (b) P(acceptance) = B(2; 16, .1) (c) P(acceptance ) = B(2; 16,.15) (d) P(acceptance) = B(2; 16, .20) 12/31/2018 UNiversity of South Alabama

15 UNiversity of South Alabama
Mean of a distribution Mean of a probability distribution is given by refer to Exercise 4.1 Value of Z f(Z=z) 0 1/12 1 2/12 2 3/12 3 3/12 4 2/12 5 1/12 µ = 0*1/2 + 1*2/12 + 2*3/12 + 3*3/12 + 4*2/12 + 5*1/12 = 28/12 = 2.33 Meaning: if the experiment of finding suitability of the lasers is repeated times and again then on the average 2.33 systems will be found suitable. 12/31/2018 UNiversity of South Alabama

16 UNiversity of South Alabama
Mean of a distribution Experiment: tossing four coins |S| = 16, S = { HHHH, HHHT, HHTH,HTHH,THHH, HHTT, HTHT, HTTH, THTH,TTHH, THHT TTTH, TTHT, THTT, HTTT TTTT } µ = Σ y*P(y) = 0*1/16 + 1*4/16 + 2*6/16 + 3*4/16 + 4*1/16 = 32/16 = 2 Interpretation: if the experiment of tossing Four coins is repeated large number of times Than on the average 2 heads will show up Let X(H) =1 and X(T) =0 Let Y = total number of heads in a toss Then Y takes values 0,1,2,3,4 Y =y P(Y =y) /16 /16 /16 /16 /16 12/31/2018 UNiversity of South Alabama

17 Mean of binomial distribution
The mean value of the binomial distribution is µ = np where n is the number of trials and p is the probability of success for each trial. Binomial distribution:Mean: np 12/31/2018 UNiversity of South Alabama

18 Mean of binomial distribution
From the definition of the mean using a distribution function, the binomial mean is The goal is to reduce this expression to just np. Since the first term in the sum is zero, since x=0, we can replace the sum with a sum starting from 1. 12/31/2018 UNiversity of South Alabama

19 Variance of the Binomial Distribution
Variance of a distribution is given by σ2 = Σ(X-µ)2*f(X) For a binomial distribution with parameters n and p, the variance is given by npq. σ2 = Σ(X-np)2*f(X) = np(1-p) 12/31/2018 UNiversity of South Alabama

20 Hypergeometric distribution
Suppose a lot of electrical switches consists of N units out of which D units are defective. We draw a sample of size n from the lot of size N and interested in number of defectives occurred in the sample X=number of defectives in a sample of size n which has been drawn from a lot of size N with D defectives. Then the distribution of X is hypergeometric. Total number of ways we can draw a sample of size n from N is (N choose n) Out of these many possible samples we want to how many sample would contain x defectives. This is (D choose x)*(N-D choose n-x) thus P(X=x) = (D choose x)*(N-D choose n-x) / (N choose n) 12/31/2018 UNiversity of South Alabama

21 Properties of hypergeometric distribution
Hypergeometric distribution has three parameters N, n, D. If we draw this sample with replacement then distribution of x is binomial with n and p=D/N If we draw this sample without replacement then x has hypergeometric distribution. Its mean is n*D/N and variance is n*a*(N-a)*(N-n)/ N2*(N-1) 12/31/2018 UNiversity of South Alabama

22 Moments of a distribution
Kth moment about origin is also known as kth raw moment µk’ = Σxk*f(x) µ1’ = Σx*f(x) =µ That is first raw moment is the mean of the distribution And kth moment about mean is also known as kth central moment µk = Σ(x-µ)k*f(x) µ1 = Σ(x-µ)*f(x) = 0 That is first central moment is 0 µ2 = Σ(x-µ)2*f(x) =σ2 That is second central moment is variance of the distribution 12/31/2018 UNiversity of South Alabama

23 Moments of a distribution
Variance can be expressed as linear combination of raw and central moments σ2 = µ2’ - µ1’2 = µ2’ - µ2 Moments are alternatively expressed as µk’ = E(Xk) µk = E(X-µ)k Thus mean and variance can be expressed as expectations µ = E(X) = expected value of x and σ2= E(X-µ)2 12/31/2018 UNiversity of South Alabama

24 UNiversity of South Alabama
Poisson Distribution Random variable x= # of defects occurred /unit Example : an assembled car has thousands of parts. X = # defects /car. Example: X = # of defects occurred /yard of cloth. Such an X has Poisson distribution given by f(x; λ) = for x = 0,1,…. λ is the parameter of Poisson distribution. Mean = variance = λ for the Poisson distribution. 12/31/2018 UNiversity of South Alabama

25 UNiversity of South Alabama
Properties Prove that binomial probabilities sum up to one. Prove the Poisson probabilities sum up to one. Prove the mean of binomial distribution is np Prove the variance of binomial distribution is npq Prove the mean and variance of Poisson distribution is λ. 12/31/2018 UNiversity of South Alabama

26 Binomial probabilities sum up to one
12/31/2018 UNiversity of South Alabama

27 Poisson Distribution (cont.)
Mean and Variance Proof: 12/31/2018 UNiversity of South Alabama

28 Poisson Approximation to Binomial
Proof: Binomial distribution with parameters (n, p) As n→∞ and p→0, with np=l moderate, binomial distribution converges to Poisson with parameter l 12/31/2018 UNiversity of South Alabama

29 Geometric Distribution
Consider the following example: A quality inspector inspecting the electrical switches right off the manufacturing belt. He is interested in the question: How may items are inspected before the first failure occurred? Suppose the first failure occurred at xth item. Then X-1 = # successes before first failure is a random variable Let probability of failure for each item is constant and is equal to p. P(X=x) = pqx-1 for x = 1,2,…. Verify that mean of geometric distribution is 1/p. Useful Link: 12/31/2018 UNiversity of South Alabama

30 Multinomial distribution
A multinomial experiment is an extended binomial probability. The difference is that in a multinomial experiment, there are more than two possible outcomes. However, there are still a fixed number of independent trials, and the probability of each outcome must remain constant from trial to trial. Instead of using a combination, as in the case of the binomial probability, the number of ways the outcomes can occur is done using distinguishable permutations. 12/31/2018 UNiversity of South Alabama

31 Multinomial distribution
The probability that a person will pass a College Algebra class is 0.55, the probability that a person will withdraw before the class is completed is 0.40, and the probability that a person will fail the class is Find the probability that in a class of 30 students, exactly 16 pass, 12 withdraw, and 2 fail. 12/31/2018 UNiversity of South Alabama

32 UNiversity of South Alabama
Exercise 4.79, 4.81 X f(X) X*f(X) X2 X2*f(X) .89 1 .07 2 .03 .06 4 .12 3 .01 9 .09 Σ 1.00 .16 .28 P(X>=2) = = .04 P(X=0) = .89 P(X>=1) = .11 a comparison of the probabilities shows that its more likely to have 0 defects Mean = Σx*f(X) = .16 Variance = ΣX2*f(X) – (ΣX*f(X))2 = .28 – (.16)2 = = .055 Standard Deviation = .2345 12/31/2018 UNiversity of South Alabama


Download ppt "Chapter 4 STAT 315 Nutan S. Mishra."

Similar presentations


Ads by Google