Math493 - Fall HW 4 Solutions

Size: px
Start display at page:

Download "Math493 - Fall 2013 - HW 4 Solutions"

Transcription

1 Math493 - Fall HW 4 Solutions Renato Feres - Wash. U. Preliminaries We have up to this point ignored a central aspect of the Monte Carlo method: How to estimate errors? Clearly, the larger the sample size used in approximating the expected value of a random variable X by the sample mean, the greater is the precision of the approximation. In other words, according to the (weak) law of large numbers, which will be stated in detail below, if x 1, x 2,..., x are sample values of an independent, identically distributed sequence of random variables X 1, X 2,..., X having the same probability distribution as X, then E(X ) x 1+ x x The question then is: For a desired precision of the approximation, how large should be? And in what precise sense does the sample mean converge to E(X ) as goes to infinity? This is a problem in statistical estimation, applied to computer simulated data (as opposed to real world data). The necessary theoretical tools are developed in chapters 4 and 5 of the textbook, the most important of which being the Central Limit Theorem. In this assignment we will take a quick look at some of those tools and apply them to a few Monte Carlo simulations. Chebyshev s inequality and the weak law of large numbers. Chebyshev s inequality is proved in section 1.10, pages 68 and 69 of the textbook. Theorem 1 (Chebyshev s inequality). If X is a random variable having mean µ and variance 2 then, for any positive constant k,. P ( X µ k ) 1 k 2. (1) The weak law of large numbers (theorem 5.1.1, page 290 of the textbook) is a simple consequence of Chebyshev s inequality. Before describing what it is, let us stop for a moment to consider a notion of limit of random variables implicit in inequality 1. Definition 1 (Convergence in probability). We say that a sequence X 1, X 2,... of random variables converges in probability towards X if for all ǫ>0 lim P ( X n X ǫ)=0. n In words: the probability that X n differs from X by more than (an arbitrarily small positive number) ǫ goes to zero as n grows towards infinity. The weak law of large numbers says that the sample mean of a sequence of i.i.d. random variables X 1, X 2,..., X, which is the random variable defined by X = X 1+ + X converges in probability to the common mean value µ=e(x i ). It also gives a (somewhat crude) estimation of error.,

2 Theorem 2 (The weak law of large numbers). Let X 1, X 2,... be a sequence of independent and identically distributed random variables having mean µ and finite variance, 2 <. Then, for any ǫ>0, It follows, in particular, that the sample mean X converges in probability to µ. P ( X µ ǫ ) 2 ǫ 2. (2) Proof. The following fact corresponds to Example of the textbook. It will also be discussed in class before too long. (This is also shown at the beginning of Math 3200.) If X 1,..., X are i.i.d. random variables with mean µ and variance 2, then ) E (X = µ, Var (X )= 2. Therefore, Chebyshev s inequality applied to X implies ( X P µ k ) 1 k 2. (3) ow choose k as follows: k = (ǫ/). Substituting this value of k into inequality 3 gives the desired result. The weak law of large numbers justifies the idea of approximating an expected value by a finite sample mean, which is at the basis of the Monte Carlo method. It also provides a way to estimate errors, which is inequality 2. It says, in essence, that if we want a high probability 1 δ that the sample mean does not deviate from the actual mean by more than a small ǫ then it is enough to choose δ 2 /ǫ 2. The following figure illustrates the convergence of a sequence of sample values of X j, for j = 1,...,. X The scatter plot in the background are the points (j, x j ), j = 1,..., (for = 500) where each x j is a sample value of an independent uniform random number X j between 2 and 2. Superimposed to this graph is the line plot of is the partial means. Point on this second graph have coordinates (j, x j ), where x j = (x 1 + +x j )/j (and the points are connected by lines.) I used the following R-script to obtain this graph. ote the use of cumsum to obtain the partial means. The point to note about the graph is that the partial means fluctuate less and less about the mean, and it clearly 2

3 appears to converge to the expected value 0. (Graphs like this one actually illustrate a stronger sense of convergence than that implied by the weak law of large numbers.) The graph was generated by the following script. =c(1:500) X=runif(length(),-2,2) plot(,x,pch=.,ylim=c(-2,2)) points(,cumsum(x)/,type= l ) An example. To illustrate how the weak law of large numbers can be used to estimate errors, consider the following very simple example. Let X 1, X 2,... be i.i.d. random numbers in [0,1] with the uniform distribution. It is an easy calculus exercise to check that Var(X i )=1/12. Suppose that we want our estimate X of the mean µ to differ from the exact value of the mean by no more than 0.01: X µ We can never be 100% sure that this will happen, no matter how big is, but we can ask to be, say 99.9% sure. This means that we want: P ( ) X µ How big should be, then? Here ǫ = 0.01 and we may take 2 ǫ Therefore, should satisfy This essentially solves the problem we had set out so solve. There are two issues, though. One is that we have used the explicitly computed value for 2 ; but we may not know this value in an actual problem any more than the value of µ, which is what we want to obtain in the first place. (Of course, in this simple example we know that µ=1/2.) We will later consider the (easy to resolve) issue of estimating 2 from the data. Another problem is that the sample size we obtain from Chebyshev s inequality is very inefficient. In other words, we can often achieve the same precision with much smaller than what Chebychev s theorem would suggest. Here is the actual simulation, with = 10 6 : > =10^6 > X=runif() #Choose random numbers between 0 and 1 > p=sum(x)/ #Obtain the empirical mean > p [1] > abs(p-0.5) #Compare empirical mean with the exact mean [1] ote how the precision obtained here, p , is so much better than Let us estimate how likely it is to get such a good approximation. (I could have been extremely luck here!) The following program repeats the same experiment 1000 times and counts how many times the error is less than

4 M=10^3 #umber of times empirical mean is computed =10^6 #Sample size a=0 #Initialize the number of times the sample # m-0.5 < 5*10^(-4) for (i in 1:M) { X=runif() p=sum(x)/ a=a+(abs(p-0.5)<5*10^(-4)) } a/m #Relative frequency of getting as good or #better precision than m-0.5 < 5*10^(-4). The value obtained fora/m was This means that we should get just as good or better an approximation than the one I first got about 90% of the time. There is another way of obtaining much better (smaller) values of by using the centrally important Central Limit Theorem. As we will see, the central limit theorem says that the probability distribution of the sample mean X can be approximated by a normal distribution when is large. So before we turn to the CLT, we need to introduce normal random variables. ormal random variables. 2 if its probability density function is given by A random variable X is said to be normally distributed with mean µ and variance f (x)= { 1 exp 1 2π 2 2 ( x µ ) } 2 for <x <. By a simple integral calculation (see section 3.4 in the text) you can show that E(X )=µ and Var(X )= 2. A useful fact to observe is that if X is normally distributed with mean µ and variance 2, then Z = X µ (4) is also a normal random variable with mean 0 and variance 1. Therefore, Z has pdf f (x)= 1 2π e x2 2 Thus the cumulative distribution function of Z takes the form Φ(x)= 1 2π x e s2 /2 d s. We say that the normal random variable Z with mean 0 and variance 1 is a standard normal random variable. Knowledge of the cumulative distribution function of Z makes it possible to compute probabilities for an arbitrary normal random variable X, by noting that ( X µ F X (x)=p (X x)=p x µ ) ( = P Z x µ ) =Φ ( x µ Values ofφ(z) can be obtained by looking up in a table, which is the traditional method. It is also easily obtained in R. The main R functions associated to the normal distribution are: ). 4

5 dnorm density function pnorm cumulative distribution function qnorm quantile function rnorm random variable The following examples illustrate the use of each of these four functions. #dnorm is the pdf of a normal r.v. #It has the following form, where the below given values #for mean and sd are the default values of #mu and sigma (the standard deviation): #dnorm(x, mean = 0, sd = 1) #For example (omitting the mean and standard deviation), > dnorm(0) [1] > dnorm(3,mean=3,sd=1) [1] > dnorm(10,mean=3,sd=1) [1] e-12 #The above number is very small since x=10 is far into the #right tail of the density function. #We can use dnorm to draw a graph #of the normal density. This is done next. # #Plot of the density curve of a normal distribution: x=seq(from=-3,to=3,length.out=100) #Set of points on the x-axis y=dnorm(x) #Values of the normal density on those x values plot(x,y,main="standard ormal Distribution",type= l,ylab="density",xlab= z ) abline(h=0) #Adds a horizontal straight line at y=0 #We want to shade the region under the graph over the #interval [1,2]. region.x=x[1<=x & x<=2] region.y=y[1<=x & x<=2] region.x=c(region.x[1],region.x,tail(region.x,1)) region.y=c( 0,region.y, 0) polygon(region.x,region.y,density=10) The graph is shown in the next figure. Areas under the density plot indicate probabilities. For example, the shaded area in the above graph represents the probability P(1 Z 2), where Z is a standard normal random variable. This interpretation of the p.d.f graph is, of course, general and doesn t only apply to normal random variables. The function pnorm is the cumulative distribution function. In particular, pnorm(z, mean = 0, sd = 1) is the same asφ(z). It will become very useful soon. Here are some examples to show the usage. #The main parameters of the function are indicated here: 5

6 Standard ormal Distribution Density z #pnorm(x, mean = 0, sd = 1) #Here x is any real number, positive, negative, or zero. #For example, > pnorm(0) [1] 0.5 > pnorm(1,mean=0,sd=2) [1] > 1-pnorm(-1,mean=0,sd=2) [1] #ote that pnorm(x) is greater than 1/2 if x>0 and #less than 1/2 if x<0. The quantile function qnorm is the inverse function of pnorm. Therefore, its argument has to be a number between 0 and 1. > qnorm(0.5,mean=0,sd=2) [1] 0 > pnorm(qnorm(.75)) [1] 0.75 > qnorm(pnorm(3)) [1] 3 > qnorm(pnorm(3,mean=0,sd=2.5),mean=1,sd=1) [1] 2.2 Finally, the function rnorm is the random variable itself. This is what you use to generate normally distributed random numbers. For example, suppose we wish to generate normally distributed random variables with µ = 0.5 and = 2, then plot a histogram. The two lines > x=rnorm(10000,mean=0.5,sd=2) > hist(x,25) generate the graph It is apparent that the histogram is an approximation of the density function graph. 6

7 Frequency Histogram of x x The difference between histogram plots and density plots. A histogram is often used to describe the probability distribution of empirical ( real world or computer simulated) random data, whereas the graph of a probability density function is often used to describe the theoretical model of the source of that data. The next graph superimposes to a histogram plot obtained from 1000 values generated by rnorm (the empirical distribution) the plot of the theoretical distribution describing that data, which is the graph of the R-functiondnorm. Histogram of x Density x The figure was generated by the following code. ote, in particular, the use oflines. Once something has been plotted, the R-command lines can be used to add new features to the displayed graph; in this case it drew the density plot over the histogram. x=rnorm(1000,mean=0,sd=2) hist(x,breaks=seq(-10,10,by=0.5),freq=false) z=seq(-10,10,0.1) lines(z,dnorm(z,mean=0,sd=2)) 7

8 The Central Limit Theorem. We now turn to the main theorem of this assignment. Theorem 3 (The Central Limit Theorem). Let X 1, X 2,... be a sequence of independent and identically distributed random variables with mean µ and finite variance 2. Let X be the mean of the first random variables in the sequence. Then ( ) lim P X µ z =Φ(z). The theorem says that the sequence of random variables X µ, where is the variance of X, converges in distribution to a standard normal random variable Z. In other words, for large values of, ( X P µ k ) P ( Z k). ote the following area relations: or, more formally, P ( Z k)=1 2P(Z k)=1 2[1 P(Z < k)]=2p(z < k) 1=2Φ(k) 1. Therefore, ( X P µ k ) 2Φ(k) 1. (5) The proof of Theorem 3 is in chapter 5 of the textbook. I will make a few comments on it below. A concrete illustration of the CLT. Let X be a random variable and X 1, X 2,... independent random variables having the same distribution as X. The central limit theorem essentially says that X X is approximately normally distributed for large, regardless of how X is distributed. As an example, suppose that X is a uniformly distributed random number between 1 and 2. Its mean is 3/2 and variance 2 = 1/12. ote that X n has mean 3/2 and standard deviation 1/ 12n. In the below four graphs we compare, for each n = 1,2,3,10, the graph of the standard normal density (dashed line) and a histogram of 10 5 values of Z n, which is defined by Z n = X n n = ( 12n X n 3 ). 2 ote that each Z n has mean 0 and standard deviation 12n. By the central limit theorem, Z n should converge in distribution to a standard normal random variable. This can be seen reasonably clearly in the below graphs. Here is the code I used to produce these graphs: par(mfrow=c(2,2))#creates a 2X2 plotting area =10^5 #Sample size ############################################# n=1 8

9 n=1 n=2 density density x x n=3 n=10 density density x x x=matrix(0,1,) for (i in 1:n){ x=x+runif(,1,2) } x=x/n x=(x-3/2)*sqrt(12*n)#substract mean, divide by sample variance. hist(x,breaks=seq(from=-4.5,to=4.5,by=0.2),freq=false, xlim=range(c(-4.5,4.5)),ylim=range(c(0,0.42)), main= n=1,xlab= x,ylab= density ) z=seq(-4.5,4.5,0.1) lines(z,dnorm(z,mean=0,sd=1),type= l,lty= dashed ) abline(h=0) grid() ############################################# n=2 x=matrix(0,1,) for (i in 1:n){ x=x+runif(,1,2) } x=x/n x=(x-3/2)*sqrt(12*n)#substract mean, divide by sample variance. hist(x,breaks=seq(from=-4.5,to=4.5,by=0.2),freq=false, xlim=range(c(-4.5,4.5)),ylim=range(c(0,0.42)), main= n=2,xlab= x,ylab= density ) z=seq(-4.5,4.5,0.1) lines(z,dnorm(z,mean=0,sd=1),type= l,lty= dashed ) abline(h=0) 9

10 grid() ############################################# n=3 x=matrix(0,1,) for (i in 1:n){ x=x+runif(,1,2) } x=x/n x=(x-3/2)*sqrt(12*n)#substract mean, divide by sample variance. hist(x,breaks=seq(from=-4.5,to=4.5,by=0.2),freq=false, xlim=range(c(-4.5,4.5)),ylim=range(c(0,0.42)), main= n=3,xlab= x,ylab= density ) z=seq(-4.5,4.5,0.1) lines(z,dnorm(z,mean=0,sd=1),type= l,lty= dashed ) abline(h=0) grid() ############################################# n=10 x=matrix(0,1,) for (i in 1:n){ x=x+runif(,1,2) } x=x/n x=(x-3/2)*sqrt(12*n)#substract mean, divide by sample variance. hist(x,breaks=seq(from=-4.5,to=4.5,by=0.2),freq=false, xlim=range(c(-4.5,4.5)),ylim=range(c(0,0.42)), main= n=10,xlab= x,ylab= density ) z=seq(-4.5,4.5,0.1) lines(z,dnorm(z,mean=0,sd=1),type= l,lty= dashed ) abline(h=0) grid() ############################################# Obtaining error estimates from the CLT (confidence intervals). Let us now return to the problem of obtaining error bounds in our Monte Carlo estimation of the mean of a random variable. Recall that good precision means that the absolute difference between the estimated mean using X and the actual mean µ should be small with high probability. Problem. Suppose that independent coin flips are simulated, where = So we consider i.i.d. random variables X 1,..., X such that X i {0,1}, p(0)= p(1)=0.5. An error tolerance value ǫ is set for estimating the mean µ by the sample mean X. 1. Find the mean µ=e(x i ) and variance Var(X i ). Solution. The mean is µ= =

11 and the variance is 2 = Suppose that ǫ=10 3. Find the probability P ( ) ( X µ ǫ ( 1 1 ) 2 = ) Solution. We need the approximate identity 5. ote that the identity can be written as follows: P ( ( ) X ǫ µ ǫ 2Φ. ) 1. (6) ow, Therefore, the probability we want is ǫ = = 1. 1/2 p= 2Φ(1) 1. We can calculate p using the R-function cumulative distribution functionpnorm: p=2*pnorm(1)-1 which gives the values p = Therefore, the probability that X µ 10 3 is approximately 70%. Said differently, if we compute many values of the sample mean X, for = , then 70% of the time resulting value of X will be that close to the exact mean. 3. What should we choose if we want X µ 10 3 with 90% confidence? Solution. Using the approximate identity 6 once again, the problem now is to find so that ( ǫ ) 2Φ 1=0.9 for ǫ=10 3. ote that ǫ 1 = Therefore, we need to solve for in ( Φ ) = (1+0.9)/2=0.95. ow we need the inverse function ofφ. This inverse is the quantile function, qnorm. Using R we obtain qnorm(0.95)= So = Finally, = ((1.645/2) 10 3 ) 2 = What if we don t know? The point of using the Monte Carlo method is to have a way of computing µ when a direct evaluation of E[X ] may not be feasible. In those cases, the direct evaluation of 2 is likely also not feasible. Therefore, 2 should also be estimated from the data. This can be done as follows. Define the sample variance, S 2, by S 2 = 1 ( ) 2 X i X. 1 In one of the problems in this homework you are going to prove the following: i=1 2 = E ( S 2). 11

12 So it seems reasonable, and will be justified later (possibly in Math 494) that for a large enough sample size the estimated value of 2 given by the value of S 2 computed from the data can be used in identity 6. Let us compare 2 and S 2 for the previous example. We already know from part (1) that 2 = To find a sample value of S 2 : = 1000 # sample values of a uniform r.v. between 0 and 1: x = sample(c(0,1),,prob=c(0.5,0.5),replace=true) #This is the sample mean m = sum(x)/ #This is the sample variance: s2 = (-1)^(-1)*sum((x-m)^2) The value I got this for the variance estimator was This seems to be sufficiently close to confirm our claim that we can substitute S for when we do not know. Moral of the story. The Monte Carlo method, generally speaking, amounts to expressing the solution to a problem as the expected value µ of some random variable X. By the law of large numbers, this expected value can be approximated by the values of the sample mean X, for some large. Approximation should be understood in the sense of convergence in probability, as explained earlier. In order to decide how large to choose for a desired level of precision, we can use the conclusion of the CLT, now substituting S for : ( X P µ S ) z 2Φ(z) 1 (7) for large. Here, 100 will typically be enough for this approximation to be acceptable. This means that, when determining the appropriate for a given precision, you should assume at least 100 so that equation 7, which is the main tool for estimating, is applicable. The procedure can be summarized by the following algorithm: 1. Choose a level of confidence, say a = Find the value of z by solving the equation 2Φ(z) 1 = a. Recall that the R-functionqnorm is the inverse function ofφ; 2. Choose a precision level ǫ; 3. Generate at least 100 data values; 4. Continue to generate additional data values until you obtain S/ < ǫ/z. 5. The estimate of µ, with the given precision ǫ and confidence level a, is then X. By this procedure, 100a = 99% of the time, the obtained value of X would be no more than ǫ away from the true value µ. 12

13 Problems 1. Sample variance. Let X 1, X 2,..., X be a random sample (that is, a sequence of i.i.d. random variables), with mean µ and variance 2. Define the sample variance as follows: S 2 = 1 ( ) 2 X i X. 1 i=1 Prove that S 2 is an unbiased estimator of 2. That is, show that E ( S 2) = 2. Hint: This is Example in the textbook. Keep in mind the following fact, which will be discussed later in class: If X and Y are independent random variables with finite expectations, then E(X Y ) = E(X )E(Y ).) Solution. ote that X i µ and X j µ are independent random variables if i j, and their expectations are equal to 0. Therefore, E [( X i µ )( X j µ )] E ( X i µ ) E ( X j µ ) = 0 = This remark is used in the transition from the fourth to the fifth term below: [ ( ) ] [( 2 1 E X µ = E = 1 2 ( Xi µ )) 2 ] [ 1 = E i=1 E i=1 2 2 i=1 j=1 [ (Xi µ ) 2 ] = 1 2 ( 2 ) = 2. By a very similar, but simpler argument you obtain: ( Xi µ )( X j µ )] = 1 if i j if i = j 2 i=1 j=1 E [( X i µ )( X j µ )] [ (Xi E µ )( X µ )]= 2. ow observe that ( ) 2= ( ) 2= ( X i X X i µ+µ X Xi µ ) 2 ( + 2 Xi µ )( ) ( ) 2 µ X + µ X. By taking expectations, and using the previous facts, we obtain [ ( ) 2 E X i X ]= = 1 2. Finally, But this is what we wanted to show. E ( S 2) = 1 [ ( ) ] 2 E X i X = 2. 1 i=1 2. Approaching the mean. The approach of the sample means of a sequence of i.i.d. random variables to the actual mean µ as the sample size increases was observed in the graph given above, after the statement of the weak law of large numbers. The graph shows a scatter plot of 500 points (j, x j ), where the x j are sample values generated byrcauchy, and the line plot of the partial means x j. (a) Produce a similar graph for the Cauchy random variable X. (The Cauchy distribution is defined in Exercise , page 57, of the textbook. Cauchy distributed random numbers can be generated in R with the function rcauchy.) 13

14 Solution. Here is the graph: X It was generated using the script =c(1:500) X=rcauchy(length()) plot(,x,pch=.,ylim=c(-10,10)) points(,cumsum(x)/,type= l ) (b) Does your graph lend support to the weak law of large numbers theorem? If not, what may be wrong with applying that theorem to this case? Solution. The graph does not seem to indicate convergence. There are big jumps at random steps that do not seem to decrease. In fact, the law of large numbers does not apply to Cauchy random variables. One requirement for that theorem to apply is that the mean and variance should be finite, but this is not the case for the Cauchy distribution, as we have shown in class. 3. Computing areas. Consider the following random experiment, whose goal is to approximate π by a Monte Carlo simulation. Let P 1,P 2,...,P be a sequence of independent, uniformly distributed random points in the square [ 1,1] [ 1,1], and let m be the number of those points that fall into the disc D = {(x, y) : x 2 + y 2 1}. Let X i be the random variable with values in {0,1}, such that X i = 1 if P i lies in the disc and 0 if not. (a) What is the expected value µ and variance 2 of X i? Solution. Let 1 D be the indicator function of the disc. Then X i = 1 D (P i ); so X i is a discrete random variable with possible values 0 and 1. Since the P i are uniformly distributed over the square, the probability that P i lies in the disc is proportional to the area of the disc. Therefore X i has pmf P(X i = 1)= Area(D) Area(S) p(x)= = π 4 if x = 1 P(X i = 0)=1 π 4 if x = 0 The mean value of X i is then µ=e(x i )=1 p(1)+0 p(0)= π 4. 14

15 The second moment of X i is E(X 2 i )=12 p(1)+0 2 p(0)= p(1)=π/4. Therefore, 2 = E ( X 2 ) i µ 2 = π ( π ) 2= 4 π 4 4 ( 1 π ). 4 (b) Explain (by citing the appropriate theorem) that for large values of n, the ratio m/n approximates π/4. Solution. This is precisely what the law of large numbers implies. If we regard m as a random variable, then X X n = m. So X n = m n. The weak law of large numbers says that m/n converges in probability to µ=π/4. (c) If n= , find the probability that the error X n µ is no greater than , where X n is the sample mean. (Here and below, use the estimate 5 or 7, obtained from the central limit theorem, rather than Chebyshev s inequality for the estimation of errors.) Solution. The main identity we need is ( X P n µ ) z 2Φ(z) 1 n Letting ǫ=0.0005, then z = ǫ z = ǫ n n = π ( ) = π Recall thatφ(z) in R ispnorm(z). The probability we want is 4 4 2Φ(z) 1=0.61. Therefore, X n µ with probability a little greater than 0.6. (d) Do a simulation of the experiment of the previous item. Give a few (say, 10) sample values of the approximation of π you obtain in this way. Solution. I used the following script: n=5*10^5 #The x and y coordinates of the random points are X=2*runif(n)-1 Y=2*runif(n)-1 #The number of random points in the disc is m=sum(x^2+y^2<1) #The approximate probability times 4 is 4*m/n Here are a few values: , , , , , , , , , The following simple program can check empirically how often we get the asked for precision ǫ. a=0*c(1:100) for (i in 1:100){ 15

16 n=5*10^5 #The x and y coordinates of the random points are X=2*runif(n)-1 Y=2*runif(n)-1 #The number of random points in the disc is u=(x^2+y^2<1) m=sum(u) #The approximate probability times 4 is a[i]=m/n } sum(abs(a-pi/4)<0.0005)/100 The fraction of times the sample mean gave a value less than away from π/4 was 0.6, as predicted. ote that the precision for the estimation of π is less since multiplying by 4 reduces the precision. In fact, about 60% of the time we get that 4X n π < = (e) How large a sample size n would be needed to insure that X n µ happens 90% of the time? (This percentage should be interpreted as follows: If your obtain k independent sample values of X n, then the inequality would hold for approximately 0.9k of those k values. ) Solution. We use again the identity ( X P n µ ) z 2Φ(z) 1 n ow the probability is 0.9, so the value of z we need is the solution to 2Φ(z) 1=0.9 Φ(z)=1.9/2=0.95. We can solve for z using the quantile functionz=qnorm(0.95). We get z = The problem now is to solve for n in ( z z = ǫ n= n ǫ ) 2= π 4 ( 1 π ) ( ) = As before, keep in mind that this is the precision for estimating µ=π/4. The error for estimating π is 4 times greater. 4. Monte Carlo approach to the Buffon needle problem. In problem 2 of homework assignment 3, you proved that the probability for Buffon s needle to cross a line is p = 2l/πa. Let us assume now that a = 1 and l = 1/2, so that p = 1/π. Using the algorithm described at the end of the above tutorial, write a program to compute 1/π by Monte Carlo simulation. Use precision ǫ=0.01 and the confidence level a = How large an did your program require? (Hint: otice that is now a random variable; you do not choose it in advance. One way to do it would be to perform the needle experiment inside a while loop; the condition for exiting the loop would be S (the square root of the sample variance) being less than some appropriate number given in terms of ǫ. At each step, choose a random x and random θ as described in the previous assignment; then compute the vertical coordinates of the head and tip of the needle: x and x +l sin θ. If either 0 or 1 lies between these two values, count one more crossing. The ratio of number of crossings per total number of trials approximates the probability p.) Solution. Let X 1, X 2,..., X be independent random variables with values in {0,1} such that X i = 1 describes the event needle crosses a line at ith step and X i = 0 the negation of X i = 1. 16

17 A simple algebraic derivation using the fact that X 2 i = X i yields the following simplification of the expression for the sample variance: S 2 = 1 ( ) 2= ) X i X 1 1 X (1 X. i=1 It is convenient to write A = X 1 + +X = X. Here is a simple way to update the sample mean and variance at the (+ 1)st step from their values at step : A +1 = A + X +1, X +1 = A , S2 +1 = + 1 ) X +1 (1 X +1. My implementation of the Monte Carlo algorithm for this problem is here: a=0.99 #Choose confidence level epsilon=0.01 #Choose precision z=qnorm((1+a)/2) #Find the value of z for the chosen a =0 #Initialize variable to count number of steps Sbound=0 #Simulation will run till sample variance is #less than Sbound. This quantity will be updated inside the #while loop for each new. A=0 #Initialize sum X X S=0 while (S>=Sbound <100) { x=runif(1) theta=2*pi*runif(1) x1=x+0.5*sin(theta) cross=(x1<0 x1>1) =+1 A=A+cross #M is the sample mean M=A/ S=(/(max(-1,0)))*M*(1-M) Sbound=sqrt()*epsilon/z } M #This is the sample mean that approximates 1/pi #This is the number of steps abs(m-1/pi) #This is the error in estimating the mean One run of this gave me the following values: x = , x (1/π) =0.007, = 3054, 1 x = It is a poor approximation of π to be sure, but it only used a little over 3000 steps. For better precision we can use smaller values of ǫ. 17

99.37, 99.38, 99.38, 99.39, 99.39, 99.39, 99.39, 99.40, 99.41, 99.42 cm

99.37, 99.38, 99.38, 99.39, 99.39, 99.39, 99.39, 99.40, 99.41, 99.42 cm Error Analysis and the Gaussian Distribution In experimental science theory lives or dies based on the results of experimental evidence and thus the analysis of this evidence is a critical part of the

More information

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1].

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1]. Probability Theory Probability Spaces and Events Consider a random experiment with several possible outcomes. For example, we might roll a pair of dice, flip a coin three times, or choose a random real

More information

The Normal Distribution. Alan T. Arnholt Department of Mathematical Sciences Appalachian State University

The Normal Distribution. Alan T. Arnholt Department of Mathematical Sciences Appalachian State University The Normal Distribution Alan T. Arnholt Department of Mathematical Sciences Appalachian State University [email protected] Spring 2006 R Notes 1 Copyright c 2006 Alan T. Arnholt 2 Continuous Random

More information

Notes on Continuous Random Variables

Notes on Continuous Random Variables Notes on Continuous Random Variables Continuous random variables are random quantities that are measured on a continuous scale. They can usually take on any value over some interval, which distinguishes

More information

4. Continuous Random Variables, the Pareto and Normal Distributions

4. Continuous Random Variables, the Pareto and Normal Distributions 4. Continuous Random Variables, the Pareto and Normal Distributions A continuous random variable X can take any value in a given range (e.g. height, weight, age). The distribution of a continuous random

More information

MATH4427 Notebook 2 Spring 2016. 2 MATH4427 Notebook 2 3. 2.1 Definitions and Examples... 3. 2.2 Performance Measures for Estimators...

MATH4427 Notebook 2 Spring 2016. 2 MATH4427 Notebook 2 3. 2.1 Definitions and Examples... 3. 2.2 Performance Measures for Estimators... MATH4427 Notebook 2 Spring 2016 prepared by Professor Jenny Baglivo c Copyright 2009-2016 by Jenny A. Baglivo. All Rights Reserved. Contents 2 MATH4427 Notebook 2 3 2.1 Definitions and Examples...................................

More information

Random variables, probability distributions, binomial random variable

Random variables, probability distributions, binomial random variable Week 4 lecture notes. WEEK 4 page 1 Random variables, probability distributions, binomial random variable Eample 1 : Consider the eperiment of flipping a fair coin three times. The number of tails that

More information

STAT 830 Convergence in Distribution

STAT 830 Convergence in Distribution STAT 830 Convergence in Distribution Richard Lockhart Simon Fraser University STAT 830 Fall 2011 Richard Lockhart (Simon Fraser University) STAT 830 Convergence in Distribution STAT 830 Fall 2011 1 / 31

More information

The normal approximation to the binomial

The normal approximation to the binomial The normal approximation to the binomial The binomial probability function is not useful for calculating probabilities when the number of trials n is large, as it involves multiplying a potentially very

More information

5. Continuous Random Variables

5. Continuous Random Variables 5. Continuous Random Variables Continuous random variables can take any value in an interval. They are used to model physical characteristics such as time, length, position, etc. Examples (i) Let X be

More information

Descriptive Statistics

Descriptive Statistics Y520 Robert S Michael Goal: Learn to calculate indicators and construct graphs that summarize and describe a large quantity of values. Using the textbook readings and other resources listed on the web

More information

Maximum Likelihood Estimation

Maximum Likelihood Estimation Math 541: Statistical Theory II Lecturer: Songfeng Zheng Maximum Likelihood Estimation 1 Maximum Likelihood Estimation Maximum likelihood is a relatively simple method of constructing an estimator for

More information

Random variables P(X = 3) = P(X = 3) = 1 8, P(X = 1) = P(X = 1) = 3 8.

Random variables P(X = 3) = P(X = 3) = 1 8, P(X = 1) = P(X = 1) = 3 8. Random variables Remark on Notations 1. When X is a number chosen uniformly from a data set, What I call P(X = k) is called Freq[k, X] in the courseware. 2. When X is a random variable, what I call F ()

More information

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan. 15.450, Fall 2010

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan. 15.450, Fall 2010 Simulation Methods Leonid Kogan MIT, Sloan 15.450, Fall 2010 c Leonid Kogan ( MIT, Sloan ) Simulation Methods 15.450, Fall 2010 1 / 35 Outline 1 Generating Random Numbers 2 Variance Reduction 3 Quasi-Monte

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 18. A Brief Introduction to Continuous Probability

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 18. A Brief Introduction to Continuous Probability CS 7 Discrete Mathematics and Probability Theory Fall 29 Satish Rao, David Tse Note 8 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces

More information

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4) Summary of Formulas and Concepts Descriptive Statistics (Ch. 1-4) Definitions Population: The complete set of numerical information on a particular quantity in which an investigator is interested. We assume

More information

Density Curve. A density curve is the graph of a continuous probability distribution. It must satisfy the following properties:

Density Curve. A density curve is the graph of a continuous probability distribution. It must satisfy the following properties: Density Curve A density curve is the graph of a continuous probability distribution. It must satisfy the following properties: 1. The total area under the curve must equal 1. 2. Every point on the curve

More information

Practice with Proofs

Practice with Proofs Practice with Proofs October 6, 2014 Recall the following Definition 0.1. A function f is increasing if for every x, y in the domain of f, x < y = f(x) < f(y) 1. Prove that h(x) = x 3 is increasing, using

More information

An Introduction to Basic Statistics and Probability

An Introduction to Basic Statistics and Probability An Introduction to Basic Statistics and Probability Shenek Heyward NCSU An Introduction to Basic Statistics and Probability p. 1/4 Outline Basic probability concepts Conditional probability Discrete Random

More information

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur Module No. #01 Lecture No. #15 Special Distributions-VI Today, I am going to introduce

More information

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Method To Solve Linear, Polynomial, or Absolute Value Inequalities: Solving Inequalities An inequality is the result of replacing the = sign in an equation with ,, or. For example, 3x 2 < 7 is a linear inequality. We call it linear because if the < were replaced with

More information

Lecture 8. Confidence intervals and the central limit theorem

Lecture 8. Confidence intervals and the central limit theorem Lecture 8. Confidence intervals and the central limit theorem Mathematical Statistics and Discrete Mathematics November 25th, 2015 1 / 15 Central limit theorem Let X 1, X 2,... X n be a random sample of

More information

For a partition B 1,..., B n, where B i B j = for i. A = (A B 1 ) (A B 2 ),..., (A B n ) and thus. P (A) = P (A B i ) = P (A B i )P (B i )

For a partition B 1,..., B n, where B i B j = for i. A = (A B 1 ) (A B 2 ),..., (A B n ) and thus. P (A) = P (A B i ) = P (A B i )P (B i ) Probability Review 15.075 Cynthia Rudin A probability space, defined by Kolmogorov (1903-1987) consists of: A set of outcomes S, e.g., for the roll of a die, S = {1, 2, 3, 4, 5, 6}, 1 1 2 1 6 for the roll

More information

Stats on the TI 83 and TI 84 Calculator

Stats on the TI 83 and TI 84 Calculator Stats on the TI 83 and TI 84 Calculator Entering the sample values STAT button Left bracket { Right bracket } Store (STO) List L1 Comma Enter Example: Sample data are {5, 10, 15, 20} 1. Press 2 ND and

More information

Probability Generating Functions

Probability Generating Functions page 39 Chapter 3 Probability Generating Functions 3 Preamble: Generating Functions Generating functions are widely used in mathematics, and play an important role in probability theory Consider a sequence

More information

Review of Random Variables

Review of Random Variables Chapter 1 Review of Random Variables Updated: January 16, 2015 This chapter reviews basic probability concepts that are necessary for the modeling and statistical analysis of financial data. 1.1 Random

More information

THE CENTRAL LIMIT THEOREM TORONTO

THE CENTRAL LIMIT THEOREM TORONTO THE CENTRAL LIMIT THEOREM DANIEL RÜDT UNIVERSITY OF TORONTO MARCH, 2010 Contents 1 Introduction 1 2 Mathematical Background 3 3 The Central Limit Theorem 4 4 Examples 4 4.1 Roulette......................................

More information

ECE302 Spring 2006 HW5 Solutions February 21, 2006 1

ECE302 Spring 2006 HW5 Solutions February 21, 2006 1 ECE3 Spring 6 HW5 Solutions February 1, 6 1 Solutions to HW5 Note: Most of these solutions were generated by R. D. Yates and D. J. Goodman, the authors of our textbook. I have added comments in italics

More information

6 3 The Standard Normal Distribution

6 3 The Standard Normal Distribution 290 Chapter 6 The Normal Distribution Figure 6 5 Areas Under a Normal Distribution Curve 34.13% 34.13% 2.28% 13.59% 13.59% 2.28% 3 2 1 + 1 + 2 + 3 About 68% About 95% About 99.7% 6 3 The Distribution Since

More information

1 if 1 x 0 1 if 0 x 1

1 if 1 x 0 1 if 0 x 1 Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or

More information

x a x 2 (1 + x 2 ) n.

x a x 2 (1 + x 2 ) n. Limits and continuity Suppose that we have a function f : R R. Let a R. We say that f(x) tends to the limit l as x tends to a; lim f(x) = l ; x a if, given any real number ɛ > 0, there exists a real number

More information

Hypothesis Testing for Beginners

Hypothesis Testing for Beginners Hypothesis Testing for Beginners Michele Piffer LSE August, 2011 Michele Piffer (LSE) Hypothesis Testing for Beginners August, 2011 1 / 53 One year ago a friend asked me to put down some easy-to-read notes

More information

Dongfeng Li. Autumn 2010

Dongfeng Li. Autumn 2010 Autumn 2010 Chapter Contents Some statistics background; ; Comparing means and proportions; variance. Students should master the basic concepts, descriptive statistics measures and graphs, basic hypothesis

More information

Chapter 4 Lecture Notes

Chapter 4 Lecture Notes Chapter 4 Lecture Notes Random Variables October 27, 2015 1 Section 4.1 Random Variables A random variable is typically a real-valued function defined on the sample space of some experiment. For instance,

More information

Normal distribution. ) 2 /2σ. 2π σ

Normal distribution. ) 2 /2σ. 2π σ Normal distribution The normal distribution is the most widely known and used of all distributions. Because the normal distribution approximates many natural phenomena so well, it has developed into a

More information

Overview of Monte Carlo Simulation, Probability Review and Introduction to Matlab

Overview of Monte Carlo Simulation, Probability Review and Introduction to Matlab Monte Carlo Simulation: IEOR E4703 Fall 2004 c 2004 by Martin Haugh Overview of Monte Carlo Simulation, Probability Review and Introduction to Matlab 1 Overview of Monte Carlo Simulation 1.1 Why use simulation?

More information

Section 1.3 P 1 = 1 2. = 1 4 2 8. P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., = 1 2 4.

Section 1.3 P 1 = 1 2. = 1 4 2 8. P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., = 1 2 4. Difference Equations to Differential Equations Section. The Sum of a Sequence This section considers the problem of adding together the terms of a sequence. Of course, this is a problem only if more than

More information

6.4 Normal Distribution

6.4 Normal Distribution Contents 6.4 Normal Distribution....................... 381 6.4.1 Characteristics of the Normal Distribution....... 381 6.4.2 The Standardized Normal Distribution......... 385 6.4.3 Meaning of Areas under

More information

1 Prior Probability and Posterior Probability

1 Prior Probability and Posterior Probability Math 541: Statistical Theory II Bayesian Approach to Parameter Estimation Lecturer: Songfeng Zheng 1 Prior Probability and Posterior Probability Consider now a problem of statistical inference in which

More information

Chapter 3 RANDOM VARIATE GENERATION

Chapter 3 RANDOM VARIATE GENERATION Chapter 3 RANDOM VARIATE GENERATION In order to do a Monte Carlo simulation either by hand or by computer, techniques must be developed for generating values of random variables having known distributions.

More information

ST 371 (IV): Discrete Random Variables

ST 371 (IV): Discrete Random Variables ST 371 (IV): Discrete Random Variables 1 Random Variables A random variable (rv) is a function that is defined on the sample space of the experiment and that assigns a numerical variable to each possible

More information

Lecture 8: More Continuous Random Variables

Lecture 8: More Continuous Random Variables Lecture 8: More Continuous Random Variables 26 September 2005 Last time: the eponential. Going from saying the density e λ, to f() λe λ, to the CDF F () e λ. Pictures of the pdf and CDF. Today: the Gaussian

More information

Basics of Statistical Machine Learning

Basics of Statistical Machine Learning CS761 Spring 2013 Advanced Machine Learning Basics of Statistical Machine Learning Lecturer: Xiaojin Zhu [email protected] Modern machine learning is rooted in statistics. You will find many familiar

More information

LOGNORMAL MODEL FOR STOCK PRICES

LOGNORMAL MODEL FOR STOCK PRICES LOGNORMAL MODEL FOR STOCK PRICES MICHAEL J. SHARPE MATHEMATICS DEPARTMENT, UCSD 1. INTRODUCTION What follows is a simple but important model that will be the basis for a later study of stock prices as

More information

Inequalities - Solve and Graph Inequalities

Inequalities - Solve and Graph Inequalities 3.1 Inequalities - Solve and Graph Inequalities Objective: Solve, graph, and give interval notation for the solution to linear inequalities. When we have an equation such as x = 4 we have a specific value

More information

1 The Brownian bridge construction

1 The Brownian bridge construction The Brownian bridge construction The Brownian bridge construction is a way to build a Brownian motion path by successively adding finer scale detail. This construction leads to a relatively easy proof

More information

Joint Exam 1/P Sample Exam 1

Joint Exam 1/P Sample Exam 1 Joint Exam 1/P Sample Exam 1 Take this practice exam under strict exam conditions: Set a timer for 3 hours; Do not stop the timer for restroom breaks; Do not look at your notes. If you believe a question

More information

A Coefficient of Variation for Skewed and Heavy-Tailed Insurance Losses. Michael R. Powers[ 1 ] Temple University and Tsinghua University

A Coefficient of Variation for Skewed and Heavy-Tailed Insurance Losses. Michael R. Powers[ 1 ] Temple University and Tsinghua University A Coefficient of Variation for Skewed and Heavy-Tailed Insurance Losses Michael R. Powers[ ] Temple University and Tsinghua University Thomas Y. Powers Yale University [June 2009] Abstract We propose a

More information

Probability and Statistics Vocabulary List (Definitions for Middle School Teachers)

Probability and Statistics Vocabulary List (Definitions for Middle School Teachers) Probability and Statistics Vocabulary List (Definitions for Middle School Teachers) B Bar graph a diagram representing the frequency distribution for nominal or discrete data. It consists of a sequence

More information

Practice problems for Homework 11 - Point Estimation

Practice problems for Homework 11 - Point Estimation Practice problems for Homework 11 - Point Estimation 1. (10 marks) Suppose we want to select a random sample of size 5 from the current CS 3341 students. Which of the following strategies is the best:

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES Contents 1. Random variables and measurable functions 2. Cumulative distribution functions 3. Discrete

More information

WHERE DOES THE 10% CONDITION COME FROM?

WHERE DOES THE 10% CONDITION COME FROM? 1 WHERE DOES THE 10% CONDITION COME FROM? The text has mentioned The 10% Condition (at least) twice so far: p. 407 Bernoulli trials must be independent. If that assumption is violated, it is still okay

More information

4 Sums of Random Variables

4 Sums of Random Variables Sums of a Random Variables 47 4 Sums of Random Variables Many of the variables dealt with in physics can be expressed as a sum of other variables; often the components of the sum are statistically independent.

More information

Efficiency and the Cramér-Rao Inequality

Efficiency and the Cramér-Rao Inequality Chapter Efficiency and the Cramér-Rao Inequality Clearly we would like an unbiased estimator ˆφ (X of φ (θ to produce, in the long run, estimates which are fairly concentrated i.e. have high precision.

More information

Statistics 104: Section 6!

Statistics 104: Section 6! Page 1 Statistics 104: Section 6! TF: Deirdre (say: Dear-dra) Bloome Email: [email protected] Section Times Thursday 2pm-3pm in SC 109, Thursday 5pm-6pm in SC 705 Office Hours: Thursday 6pm-7pm SC

More information

AMS 5 CHANCE VARIABILITY

AMS 5 CHANCE VARIABILITY AMS 5 CHANCE VARIABILITY The Law of Averages When tossing a fair coin the chances of tails and heads are the same: 50% and 50%. So if the coin is tossed a large number of times, the number of heads and

More information

3.4 The Normal Distribution

3.4 The Normal Distribution 3.4 The Normal Distribution All of the probability distributions we have found so far have been for finite random variables. (We could use rectangles in a histogram.) A probability distribution for a continuous

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

Metric Spaces. Chapter 7. 7.1. Metrics

Metric Spaces. Chapter 7. 7.1. Metrics Chapter 7 Metric Spaces A metric space is a set X that has a notion of the distance d(x, y) between every pair of points x, y X. The purpose of this chapter is to introduce metric spaces and give some

More information

STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables

STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables Discrete vs. continuous random variables Examples of continuous distributions o Uniform o Exponential o Normal Recall: A random

More information

Standard Deviation Estimator

Standard Deviation Estimator CSS.com Chapter 905 Standard Deviation Estimator Introduction Even though it is not of primary interest, an estimate of the standard deviation (SD) is needed when calculating the power or sample size of

More information

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)! Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

Solving Quadratic & Higher Degree Inequalities

Solving Quadratic & Higher Degree Inequalities Ch. 8 Solving Quadratic & Higher Degree Inequalities We solve quadratic and higher degree inequalities very much like we solve quadratic and higher degree equations. One method we often use to solve quadratic

More information

Week 4: Standard Error and Confidence Intervals

Week 4: Standard Error and Confidence Intervals Health Sciences M.Sc. Programme Applied Biostatistics Week 4: Standard Error and Confidence Intervals Sampling Most research data come from subjects we think of as samples drawn from a larger population.

More information

UNIT I: RANDOM VARIABLES PART- A -TWO MARKS

UNIT I: RANDOM VARIABLES PART- A -TWO MARKS UNIT I: RANDOM VARIABLES PART- A -TWO MARKS 1. Given the probability density function of a continuous random variable X as follows f(x) = 6x (1-x) 0

More information

Lecture 7: Continuous Random Variables

Lecture 7: Continuous Random Variables Lecture 7: Continuous Random Variables 21 September 2005 1 Our First Continuous Random Variable The back of the lecture hall is roughly 10 meters across. Suppose it were exactly 10 meters, and consider

More information

EQUATIONS and INEQUALITIES

EQUATIONS and INEQUALITIES EQUATIONS and INEQUALITIES Linear Equations and Slope 1. Slope a. Calculate the slope of a line given two points b. Calculate the slope of a line parallel to a given line. c. Calculate the slope of a line

More information

1.1 Introduction, and Review of Probability Theory... 3. 1.1.1 Random Variable, Range, Types of Random Variables... 3. 1.1.2 CDF, PDF, Quantiles...

1.1 Introduction, and Review of Probability Theory... 3. 1.1.1 Random Variable, Range, Types of Random Variables... 3. 1.1.2 CDF, PDF, Quantiles... MATH4427 Notebook 1 Spring 2016 prepared by Professor Jenny Baglivo c Copyright 2009-2016 by Jenny A. Baglivo. All Rights Reserved. Contents 1 MATH4427 Notebook 1 3 1.1 Introduction, and Review of Probability

More information

0 0 such that f x L whenever x a

0 0 such that f x L whenever x a Epsilon-Delta Definition of the Limit Few statements in elementary mathematics appear as cryptic as the one defining the limit of a function f() at the point = a, 0 0 such that f L whenever a Translation:

More information

You flip a fair coin four times, what is the probability that you obtain three heads.

You flip a fair coin four times, what is the probability that you obtain three heads. Handout 4: Binomial Distribution Reading Assignment: Chapter 5 In the previous handout, we looked at continuous random variables and calculating probabilities and percentiles for those type of variables.

More information

CHAPTER 2 Estimating Probabilities

CHAPTER 2 Estimating Probabilities CHAPTER 2 Estimating Probabilities Machine Learning Copyright c 2016. Tom M. Mitchell. All rights reserved. *DRAFT OF January 24, 2016* *PLEASE DO NOT DISTRIBUTE WITHOUT AUTHOR S PERMISSION* This is a

More information

ECE302 Spring 2006 HW4 Solutions February 6, 2006 1

ECE302 Spring 2006 HW4 Solutions February 6, 2006 1 ECE302 Spring 2006 HW4 Solutions February 6, 2006 1 Solutions to HW4 Note: Most of these solutions were generated by R. D. Yates and D. J. Goodman, the authors of our textbook. I have added comments in

More information

Aggregate Loss Models

Aggregate Loss Models Aggregate Loss Models Chapter 9 Stat 477 - Loss Models Chapter 9 (Stat 477) Aggregate Loss Models Brian Hartman - BYU 1 / 22 Objectives Objectives Individual risk model Collective risk model Computing

More information

E3: PROBABILITY AND STATISTICS lecture notes

E3: PROBABILITY AND STATISTICS lecture notes E3: PROBABILITY AND STATISTICS lecture notes 2 Contents 1 PROBABILITY THEORY 7 1.1 Experiments and random events............................ 7 1.2 Certain event. Impossible event............................

More information

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model 1 September 004 A. Introduction and assumptions The classical normal linear regression model can be written

More information

Chicago Booth BUSINESS STATISTICS 41000 Final Exam Fall 2011

Chicago Booth BUSINESS STATISTICS 41000 Final Exam Fall 2011 Chicago Booth BUSINESS STATISTICS 41000 Final Exam Fall 2011 Name: Section: I pledge my honor that I have not violated the Honor Code Signature: This exam has 34 pages. You have 3 hours to complete this

More information

4.1 4.2 Probability Distribution for Discrete Random Variables

4.1 4.2 Probability Distribution for Discrete Random Variables 4.1 4.2 Probability Distribution for Discrete Random Variables Key concepts: discrete random variable, probability distribution, expected value, variance, and standard deviation of a discrete random variable.

More information

Lectures 5-6: Taylor Series

Lectures 5-6: Taylor Series Math 1d Instructor: Padraic Bartlett Lectures 5-: Taylor Series Weeks 5- Caltech 213 1 Taylor Polynomials and Series As we saw in week 4, power series are remarkably nice objects to work with. In particular,

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Numerical Methods for Option Pricing

Numerical Methods for Option Pricing Chapter 9 Numerical Methods for Option Pricing Equation (8.26) provides a way to evaluate option prices. For some simple options, such as the European call and put options, one can integrate (8.26) directly

More information

Binomial Distribution n = 20, p = 0.3

Binomial Distribution n = 20, p = 0.3 This document will describe how to use R to calculate probabilities associated with common distributions as well as to graph probability distributions. R has a number of built in functions for calculations

More information

CA200 Quantitative Analysis for Business Decisions. File name: CA200_Section_04A_StatisticsIntroduction

CA200 Quantitative Analysis for Business Decisions. File name: CA200_Section_04A_StatisticsIntroduction CA200 Quantitative Analysis for Business Decisions File name: CA200_Section_04A_StatisticsIntroduction Table of Contents 4. Introduction to Statistics... 1 4.1 Overview... 3 4.2 Discrete or continuous

More information

BEST METHODS FOR SOLVING QUADRATIC INEQUALITIES.

BEST METHODS FOR SOLVING QUADRATIC INEQUALITIES. BEST METHODS FOR SOLVING QUADRATIC INEQUALITIES. I. GENERALITIES There are 3 common methods to solve quadratic inequalities. Therefore, students sometimes are confused to select the fastest and the best

More information

5.3 Improper Integrals Involving Rational and Exponential Functions

5.3 Improper Integrals Involving Rational and Exponential Functions Section 5.3 Improper Integrals Involving Rational and Exponential Functions 99.. 3. 4. dθ +a cos θ =, < a

More information

Simple Regression Theory II 2010 Samuel L. Baker

Simple Regression Theory II 2010 Samuel L. Baker SIMPLE REGRESSION THEORY II 1 Simple Regression Theory II 2010 Samuel L. Baker Assessing how good the regression equation is likely to be Assignment 1A gets into drawing inferences about how close the

More information

Econometrics Simple Linear Regression

Econometrics Simple Linear Regression Econometrics Simple Linear Regression Burcu Eke UC3M Linear equations with one variable Recall what a linear equation is: y = b 0 + b 1 x is a linear equation with one variable, or equivalently, a straight

More information

I. Pointwise convergence

I. Pointwise convergence MATH 40 - NOTES Sequences of functions Pointwise and Uniform Convergence Fall 2005 Previously, we have studied sequences of real numbers. Now we discuss the topic of sequences of real valued functions.

More information

Math 431 An Introduction to Probability. Final Exam Solutions

Math 431 An Introduction to Probability. Final Exam Solutions Math 43 An Introduction to Probability Final Eam Solutions. A continuous random variable X has cdf a for 0, F () = for 0 <

More information

Principle of Data Reduction

Principle of Data Reduction Chapter 6 Principle of Data Reduction 6.1 Introduction An experimenter uses the information in a sample X 1,..., X n to make inferences about an unknown parameter θ. If the sample size n is large, then

More information

Covariance and Correlation

Covariance and Correlation Covariance and Correlation ( c Robert J. Serfling Not for reproduction or distribution) We have seen how to summarize a data-based relative frequency distribution by measures of location and spread, such

More information

Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page

Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page Errata for ASM Exam C/4 Study Manual (Sixteenth Edition) Sorted by Page 1 Errata and updates for ASM Exam C/Exam 4 Manual (Sixteenth Edition) sorted by page Practice exam 1:9, 1:22, 1:29, 9:5, and 10:8

More information

The normal approximation to the binomial

The normal approximation to the binomial The normal approximation to the binomial In order for a continuous distribution (like the normal) to be used to approximate a discrete one (like the binomial), a continuity correction should be used. There

More information

1 Error in Euler s Method

1 Error in Euler s Method 1 Error in Euler s Method Experience with Euler s 1 method raises some interesting questions about numerical approximations for the solutions of differential equations. 1. What determines the amount of

More information

Introduction to the Monte Carlo method

Introduction to the Monte Carlo method Some history Simple applications Radiation transport modelling Flux and Dose calculations Variance reduction Easy Monte Carlo Pioneers of the Monte Carlo Simulation Method: Stanisław Ulam (1909 1984) Stanislaw

More information

Notes on metric spaces

Notes on metric spaces Notes on metric spaces 1 Introduction The purpose of these notes is to quickly review some of the basic concepts from Real Analysis, Metric Spaces and some related results that will be used in this course.

More information

Math 461 Fall 2006 Test 2 Solutions

Math 461 Fall 2006 Test 2 Solutions Math 461 Fall 2006 Test 2 Solutions Total points: 100. Do all questions. Explain all answers. No notes, books, or electronic devices. 1. [105+5 points] Assume X Exponential(λ). Justify the following two

More information

Derive 5: The Easiest... Just Got Better!

Derive 5: The Easiest... Just Got Better! Liverpool John Moores University, 1-15 July 000 Derive 5: The Easiest... Just Got Better! Michel Beaudin École de Technologie Supérieure, Canada Email; [email protected] 1. Introduction Engineering

More information

MATH 140 Lab 4: Probability and the Standard Normal Distribution

MATH 140 Lab 4: Probability and the Standard Normal Distribution MATH 140 Lab 4: Probability and the Standard Normal Distribution Problem 1. Flipping a Coin Problem In this problem, we want to simualte the process of flipping a fair coin 1000 times. Note that the outcomes

More information