Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Outline Chapter 3: Random Sampling, Probability, and the Binomial Distribution Part II I Density Curves I Random Variables I The Binomial Distribution I Fitting a Binomial Distribution to Data Eric D. Nordmoe Math 261 Department of Mathematics and Computer Science Kalamazoo College Spring 2009 Random Sampling Model Random Variables A random variable is a variable that takes on numerical values that depend on the outcome of a chance operation. Probability Model Types of Random Variables Random Sampling Population Sample I Continuous random variables take values on a continuous scale. I Discrete random variables have a discrete list of possible values. Probability Models for Random Variables Density Curve Example The method of characterizing the distribution of a random variable depends on the nature of the variable: 0.005 0.010 The distribution of a continuous random variable is described by a density curve. I A probability density may be viewed as an idealized histogram. 0.000 Continuous Random Variables Density The distribution of a discrete random variable is described by the probability distribution comprised of enumerated possible values and corresponding probabilities. 0.015 Discrete Random Variables I A stylistic example 50 100 150 Diastolic Blood Pressure Histogram Density Curve I I I The proportion of the distribution that falls in that range. The probability that a randomly selected individual has a value in that range. 0.25 0.20 The total area underneath the density is 1. The area under the curve and above any range of values can be interpreted in two ways: 0.15 I 0.10 The density curve always lies on or above the horizontal axis. P(1<Y<3)= 0.41 0.05 I Probability as the Area Under a Density Curve 0.00 Properties of Density Curves 0 1 2 3 4 5 6 7 8 9 10 Probability Distribution of Y yi Pr(Y = yi ) 1 0.1 2 0.2 3 0.3 4 0.4 Total 1.0 Probabilities of all possible values must sum to one. 0.5 Probability 0.2 0.3 0.4 The probability distribution of a discrete random variable is a list of the possible values of the random variable and the probability associated with each possible value. Graphical 0.1 Probability Distributions Other Views of the Probability Distribution of Y 0.0 Properties of Discrete Random Variables 1 2 3 Formulaic P(Y = y ) = Mean and Variance of a Discrete Random Variable The Mean µY The mean of a discrete random variable is X µY = yi Pr(Y = yi ) I the sum of the values times their corresponding probabilities. I the center of gravity of the probability distribution. I also known as the expected value E(Y ). 4 Y y , 10 y = 1, 2, 3, 4. Computing the Mean Using the data from Example 3.35 (p.98) we have: No. of Vertebrae y 20 21 22 23 Total Hence, E(Y ) = µY = 21.49 Pr(y ) 0.03 0.51 0.4 0.06 1 y × Pr (y ) 0.60 10.71 8.80 1.38 21.49 Mean and Variance of a Discrete Random Variable Given µY = 21.49, we have: The Variance σY2 The variance of a discrete random variable is X σY2 = (yi − µY )2 Pr(Y = yi ) I Computing the Variance the sum of the squared deviations of the values from their expected value times their corresponding probabilities. No. of Vert y 20 21 22 23 Total Pr(y ) 0.03 0.51 0.4 0.06 1 (y − 21.49)2 2.220 0.240 0.260 2.280 Hence, σY2 = 0.430 and σ = Properties of Means and Variances (y − 21.49)2 × Pr(y ) 0.067 0.122 0.104 0.137 0.430 √ 0.430 = .656. Properties of Means and Variances Variances Means 1. The mean of a sum is the sum of the means. µX +Y = µX + µY 1. The variance of a sum is the sum of the variances if the random variables are independent σX2 +Y = σX2 + σY2 2. The mean of a difference is the difference of the means. µX −Y = µX − µY 3. Means of linear combinations are the same linear combination of the mean: 2. The variance of a difference is the sum of the variances if the random variables are independent σX2 −Y = σX2 + σY2 3. The variance is not changed by adding a constant: µaX +b = aµX + b σX2 +b = σX2 4. The variance of a linear combination 2 2 2 σaX +b = a σX . Binomial Random Variables Binomial Random Variables Binomial Experiments Random variable The binomial random variable tallies the number of successes in the n trials. 1. Binary outcomes: Each trial has just two possible outcomes (success or failure). Parameters 2. Independent trials The binomial distribution has two parameters: 3. n is fixed: The number of trials is fixed in advance n the number of trials 4. Same value of p: each trial has the same success probability, p. p the success probability Examples Binomial Probability Distributions Binomial Probability Distributions Binomial Distribution n = 100 , p = 0.5 Binomial Distribution n = 30 , p = 0.1 Binomial Distribution n = 100 , p = 0.1 0 2 4 6 Possible Values 8 10 0 5 10 15 20 Possible Values 25 30 0 20 40 60 Possible Values 80 100 0.10 0 2 4 6 Possible Values 8 10 0.08 Probability 0.00 0.00 0.0 0.00 0.00 0.00 0.02 0.05 0.05 0.02 0.1 0.04 0.06 Probability 0.05 0.10 0.10 0.2 Probability 0.04 Probability Probability Probability 0.15 0.15 0.10 0.06 0.3 0.20 0.20 0.12 0.08 0.25 Binomial Distribution n = 10 , p = 0.1 0.4 Binomial Distribution n = 30 , p = 0.5 0.15 Binomial Distribution n = 10 , p = 0.5 0 5 10 15 20 Possible Values 25 30 0 20 40 60 Possible Values 80 100 Binomial Probability Distributions Binomial Distribution n = 30 , p = 0.9 Binomial Distribution n = 100 , p = 0.9 I 0.4 Binomial Distribution n = 10 , p = 0.9 The Binomial Probability Distribution Function 0.12 Pr{j successes} = Pr(Y = j) = n Cj pj (1 − p)n−j 0.20 where n Cj Probability I = n! j!(n − j)! The binomial coefficient n Cj is the number of ways to get j successes in n trials. 0 2 4 6 8 10 0.00 0.0 0.00 0.02 0.05 0.1 0.04 0.10 0.06 Probability 0.08 0.15 0.10 0.3 0.2 Probability The binomial probability distribution function is 0 5 Possible Values 10 15 20 25 30 Possible Values 0 20 40 60 80 100 Possible Values The Binomial Probability Distribution Function Mean and Variance The mean (or expected value) of a binomial random variable is E(Y ) = µY = np and the variance is V (Y ) = σ 2 = np(1 − p) so the standard deviation is σY = p np(1 − p. Binomial Data Number of Boys Data. The following table shows the number of boys among the first four children in 3343 Swedish families of size 4 or more. Number of Boys 0 1 2 3 4 Total Frequency 183 789 1250 875 246 3343