Math493 - Fall HW 4 Solutions

Size: px
Start display at page:

Download "Math493 - Fall 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 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 EX 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 EX 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 discussed later in 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 simulation problems. Chebyshev s inequality and the weak law of large numbers. 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 That is, the probability that X is more that k standard deviations away from the mean is no more than 1/k 2. The weak law of large numbers 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 X, converges in probability to the common mean value µ = EX 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. If X 1,..., X are i.i.d. random variables with mean µ and variance 2 then, as we will see in class, 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. Points 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 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. 2

3 The graph was generated by the following script. =c1:500 X=runiflength,-2,2 plot,x,pch=.,ylim=c-2,2 points,cumsumx/,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 VarX 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=sumx/ #Obtain the empirical mean > p [1] > absp-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 M=10^3 #umber of times empirical mean is computed 3

4 =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=sumx/ a=a+absp-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 for a/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. A random variable X is said to be normally distributed with mean µ and variance 2 if its probability density function a notion defined in HW 3 is given by f x = { 1 exp 1 2π 2 2 x µ } 2 for < x <. By a simple integral calculation you can show that EX = µ and VarX = 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, which is defined as the probability that Z x, 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: dnorm density function. 4

5 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: #dnormx, mean = 0, sd = 1 #For example omitting the mean and standard deviation, > dnorm0 [1] > dnorm3,mean=3,sd=1 [1] > dnorm10,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=seqfrom=-3,to=3,length.out=100 #Set of points on the x-axis y=dnormx #Values of the normal density on those x values plotx,y,main="standard ormal Distribution",type= l,ylab="density",xlab= z ablineh=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=cregion.x[1],region.x,tailregion.x,1 region.y=c 0,region.y, 0 polygonregion.x,region.y,density=10 The graph is shown in the next figure. 5

6 Standard ormal Distribution Density z Areas under the density plot indicate probabilities. For example, the shaded area in the above graph represents the probability P1 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, pnormz, mean = 0, sd = 1 is the same as Φz defined above. It will become very useful soon. Here are some examples to show the usage. #The main parameters of the function are indicated here: #pnormx, mean = 0, sd = 1 #Here x is any real number, positive, negative, or zero. #For example, > pnorm0 [1] 0.5 > pnorm1,mean=0,sd=2 [1] > 1-pnorm-1,mean=0,sd=2 [1] #ote that pnormx 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. Convince yourself that the first three values in what follows make sense: > qnorm0.5,mean=0,sd=2 [1] 0 > pnormqnorm.75 [1] 0.75 > qnormpnorm3 [1] 3 > qnormpnorm3,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 6

7 > x=rnorm10000,mean=0.5,sd=2 > histx,25 generate the graph Frequency Histogram of x x It is apparent that the histogram is an approximation of the density function graph. 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-function dnorm. Histogram of x Density x The figure was generated by the following code. ote, in particular, the use of lines. 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. 7

8 x=rnorm1000,mean=0,sd=2 histx,breaks=seq-10,10,by=0.5,freq=false z=seq-10,10,0.1 linesz,dnormz,mean=0,sd=2 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 2PZ k = 1 2[1 PZ < k] = 2PZ < k 1 = 2Φk 1. Therefore, X P µ k 2Φk 1. 5 The proof of Theorem 3 will be discussed towards the end of this course. 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. 8

9 n=1 n=2 density density x x n=3 n=10 density density x x Here is the code I used to produce these graphs: parmfrow=c2,2#creates a 2X2 plotting area =10^5 #Sample size ############################################# n=1 x=matrix0,1, for i in 1:n{ x=x+runif,1,2 } x=x/n x=x-3/2*sqrt12*n#subtract mean, divide by sample variance. histx,breaks=seqfrom=-4.5,to=4.5,by=0.2,freq=false, xlim=rangec-4.5,4.5,ylim=rangec0,0.42, main= n=1,xlab= x,ylab= density z=seq-4.5,4.5,0.1 linesz,dnormz,mean=0,sd=1,type= l,lty= dashed ablineh=0 grid ############################################# n=2 x=matrix0,1, for i in 1:n{ x=x+runif,1,2 } x=x/n x=x-3/2*sqrt12*n#subtract mean, divide by sample variance. histx,breaks=seqfrom=-4.5,to=4.5,by=0.2,freq=false, 9

10 xlim=rangec-4.5,4.5,ylim=rangec0,0.42, main= n=2,xlab= x,ylab= density z=seq-4.5,4.5,0.1 linesz,dnormz,mean=0,sd=1,type= l,lty= dashed ablineh=0 grid ############################################# n=3 x=matrix0,1, for i in 1:n{ x=x+runif,1,2 } x=x/n x=x-3/2*sqrt12*n#subtract mean, divide by sample variance. histx,breaks=seqfrom=-4.5,to=4.5,by=0.2,freq=false, xlim=rangec-4.5,4.5,ylim=rangec0,0.42, main= n=3,xlab= x,ylab= density z=seq-4.5,4.5,0.1 linesz,dnormz,mean=0,sd=1,type= l,lty= dashed ablineh=0 grid ############################################# n=10 x=matrix0,1, for i in 1:n{ x=x+runif,1,2 } x=x/n x=x-3/2*sqrt12*n#subtract mean, divide by sample variance. histx,breaks=seqfrom=-4.5,to=4.5,by=0.2,freq=false, xlim=rangec-4.5,4.5,ylim=rangec0,0.42, main= n=10,xlab= x,ylab= density z=seq-4.5,4.5,0.1 linesz,dnormz,mean=0,sd=1,type= l,lty= dashed ablineh=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}, p0 = p1 = 0.5. An error tolerance value ɛ is set for estimating the mean µ by the sample mean X. 10

11 1. Find the mean µ = EX i and variance VarX i. Solution. The mean is and the variance is 2 = Suppose that ɛ = Find the probability P µ = = X µ ɛ = Solution. We need the approximate identity 5. ote that the identity can be written as follows: P X ɛ µ ɛ 2Φ ow, Therefore, the probability we want is ɛ = = 1. 1/2 p = 2Φ1 1. We can calculate p using the R-function cumulative distribution function pnorm: p = 2*pnorm1-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 much close to the exact mean. 3. What should we choose if we want X µ 10 3 with 90% confidence? Solution. Using the approximate identity 5 or 6 once again, the problem now is to find so that ɛ 2Φ 1 = 0.9 for ɛ = ote that ɛ 1 = Therefore, we need to solve for in Φ = /2 = ow we need the inverse function of Φ. This inverse is the quantile function, qnorm. Using R we obtain qnorm0.95= So = Finally, = 1.645/ = 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 i=1 11

12 In one of the problems in this homework you are going to prove the following: 2 = E S 2. 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 = samplec0,1,,prob=c0.5,0.5,replace=true #This is the sample mean m = sumx/ #This is the sample variance: s2 = -1^-1*sumx-m^2 The value I got 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-function qnorm 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: 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 EX Y = EX EY. 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 ] = = 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 µ 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 by runif, and the line plot of the partial means x j. a Produce a similar graph for the Cauchy random variable X. For the definition of the Cauchy distribution, see section 6.3 of chapter 5 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 =c1:500 X=rcauchylength plot,x,pch=.,ylim=c-10,10 points,cumsumx/,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? For this problem, do some research online about the Cauchy distribution, for example here What can you say about the mean and variance of a Cauchy random variable? 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. 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 mean 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 PX i = 1 = AreaD AreaS px = = π 4 if x = 1 PX i = 0 = 1 π 4 if x = 0 14

15 The mean value of X i is then µ = EX i = 1 p1 + 0 p0 = π 4. The second moment of X i is EX 2 i = 12 p p0 = p1 = π/4. Therefore, 2 = E X 2 i µ 2 = π π 2 4 π = π. 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 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 ɛ = , then z = ɛ z = ɛ n n = π = π Recall that Φz in R is pnormz. The probability we want is 4 4 2Φz 1 = 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*runifn-1 Y=2*runifn-1 #The number of random points in the disc is m=sumx^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 ɛ. 15

16 a=0*c1:100 for i in 1:100{ n=5*10^5 #The x and y coordinates of the random points are X=2*runifn-1 Y=2*runifn-1 #The number of random points in the disc is u=x^2+y^2<1 m=sumu #The approximate probability times 4 is a[i]=m/n } sumabsa-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 = We can solve for z using the quantile function z=qnorm0.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. 16

17 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. 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 1 i=1 X i X 2 = 1 X 1 X. It is convenient to write A = X 1 + +X = X. Here is a simple way to update the sample mean and variance at the + 1st 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=qnorm1+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=runif1 theta=2*pi*runif1 x1=x+0.5*sintheta cross=x1<0 x1>1 =+1 A=A+cross #M is the sample mean M=A/ S=sqrt/max-1,1*M*1-M Sbound=sqrt*epsilon/z } M #This is the sample mean that approximates 1/pi #This is the number of steps absm-1/pi #This is the error in estimating the mean One run of this gave me the following values: x = , x 1/π = 0.003, = 14469, 1 x = It is a poor approximation of π to be sure, but it only used about steps. For better precision we can use smaller values of ɛ. 17

Homework set 5 - Solutions

Homework set 5 - Solutions Homework set 5 - Solutions Math 3 Renato Feres 1. Illustrating the central limit theorem. Let X be a random variable having the uniform distribution over the interval [1,]. Denote by X 1, X, X 3,... a

More information

Math493 - Fall HW 2 Solutions

Math493 - Fall HW 2 Solutions Math493 - Fall 2017 - HW 2 Solutions Renato Feres - Wash. U. Preliminaries. In this assignment you will do a few more simulations in the style of the first assignment to explore conditional probability,

More information

8 Laws of large numbers

8 Laws of large numbers 8 Laws of large numbers 8.1 Introduction We first start with the idea of standardizing a random variable. Let X be a random variable with mean µ and variance σ 2. Then Z = (X µ)/σ will be a random variable

More information

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom Central Limit Theorem and the Law of Large Numbers Class 6, 8.5 Jeremy Orloff and Jonathan Bloom Learning Goals. Understand the statement of the law of large numbers. 2. Understand the statement of the

More information

Math489/889 Stochastic Processes and Advanced Mathematical Finance Solutions for Homework 7

Math489/889 Stochastic Processes and Advanced Mathematical Finance Solutions for Homework 7 Math489/889 Stochastic Processes and Advanced Mathematical Finance Solutions for Homework 7 Steve Dunbar Due Mon, November 2, 2009. Time to review all of the information we have about coin-tossing fortunes

More information

Homework set 2 - Solutions

Homework set 2 - Solutions Homework set 2 - Solutions Math 495 Renato Feres Simulating a Markov chain in R Generating sample sequences of a finite state Markov chain. The following is a simple program for generating sample sequences

More information

Homework for 1/13 Due 1/22

Homework for 1/13 Due 1/22 Name: ID: Homework for 1/13 Due 1/22 1. [ 5-23] An irregularly shaped object of unknown area A is located in the unit square 0 x 1, 0 y 1. Consider a random point distributed uniformly over the square;

More information

Lecture Notes 5 Convergence and Limit Theorems. Convergence with Probability 1. Convergence in Mean Square. Convergence in Probability, WLLN

Lecture Notes 5 Convergence and Limit Theorems. Convergence with Probability 1. Convergence in Mean Square. Convergence in Probability, WLLN Lecture Notes 5 Convergence and Limit Theorems Motivation Convergence with Probability Convergence in Mean Square Convergence in Probability, WLLN Convergence in Distribution, CLT EE 278: Convergence and

More information

Lecture 4: September Reminder: convergence of sequences

Lecture 4: September Reminder: convergence of sequences 36-705: Intermediate Statistics Fall 2017 Lecturer: Siva Balakrishnan Lecture 4: September 6 In this lecture we discuss the convergence of random variables. At a high-level, our first few lectures focused

More information

1 Probability Distributions

1 Probability Distributions 1 Probability Distributions A probability distribution describes how the values of a random variable are distributed. For example, the collection of all possible outcomes of a sequence of coin tossing

More information

MATH Notebook 5 Fall 2018/2019

MATH Notebook 5 Fall 2018/2019 MATH442601 2 Notebook 5 Fall 2018/2019 prepared by Professor Jenny Baglivo c Copyright 2004-2019 by Jenny A. Baglivo. All Rights Reserved. 5 MATH442601 2 Notebook 5 3 5.1 Sequences of IID Random Variables.............................

More information

Lecture 8. October 22, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Lecture 8. October 22, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University. Lecture 8 Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University October 22, 2007 1 2 3 4 5 6 1 Define convergent series 2 Define the Law of Large Numbers

More information

Open book, but no loose leaf notes and no electronic devices. Points (out of 200) are in parentheses. Put all answers on the paper provided to you.

Open book, but no loose leaf notes and no electronic devices. Points (out of 200) are in parentheses. Put all answers on the paper provided to you. ISQS 5347 Final Exam Spring 2017 Open book, but no loose leaf notes and no electronic devices. Points (out of 200) are in parentheses. Put all answers on the paper provided to you. 1. Recall the commute

More information

University of Regina. Lecture Notes. Michael Kozdron

University of Regina. Lecture Notes. Michael Kozdron University of Regina Statistics 252 Mathematical Statistics Lecture Notes Winter 2005 Michael Kozdron kozdron@math.uregina.ca www.math.uregina.ca/ kozdron Contents 1 The Basic Idea of Statistics: Estimating

More information

Lecture 10: Probability distributions TUESDAY, FEBRUARY 19, 2019

Lecture 10: Probability distributions TUESDAY, FEBRUARY 19, 2019 Lecture 10: Probability distributions DANIEL WELLER TUESDAY, FEBRUARY 19, 2019 Agenda What is probability? (again) Describing probabilities (distributions) Understanding probabilities (expectation) Partial

More information

Robustness and Distribution Assumptions

Robustness and Distribution Assumptions Chapter 1 Robustness and Distribution Assumptions 1.1 Introduction In statistics, one often works with model assumptions, i.e., one assumes that data follow a certain model. Then one makes use of methodology

More information

17. Convergence of Random Variables

17. Convergence of Random Variables 7. Convergence of Random Variables In elementary mathematics courses (such as Calculus) one speaks of the convergence of functions: f n : R R, then lim f n = f if lim f n (x) = f(x) for all x in R. This

More information

Basic Probability. Introduction

Basic Probability. Introduction Basic Probability Introduction The world is an uncertain place. Making predictions about something as seemingly mundane as tomorrow s weather, for example, is actually quite a difficult task. Even with

More information

Example continued. Math 425 Intro to Probability Lecture 37. Example continued. Example

Example continued. Math 425 Intro to Probability Lecture 37. Example continued. Example continued : Coin tossing Math 425 Intro to Probability Lecture 37 Kenneth Harris kaharri@umich.edu Department of Mathematics University of Michigan April 8, 2009 Consider a Bernoulli trials process with

More information

6.1 Moment Generating and Characteristic Functions

6.1 Moment Generating and Characteristic Functions Chapter 6 Limit Theorems The power statistics can mostly be seen when there is a large collection of data points and we are interested in understanding the macro state of the system, e.g., the average,

More information

Lecture 2 Sep 5, 2017

Lecture 2 Sep 5, 2017 CS 388R: Randomized Algorithms Fall 2017 Lecture 2 Sep 5, 2017 Prof. Eric Price Scribe: V. Orestis Papadigenopoulos and Patrick Rall NOTE: THESE NOTES HAVE NOT BEEN EDITED OR CHECKED FOR CORRECTNESS 1

More information

This exam is closed book and closed notes. (You will have access to a copy of the Table of Common Distributions given in the back of the text.

This exam is closed book and closed notes. (You will have access to a copy of the Table of Common Distributions given in the back of the text. TEST #3 STA 5326 December 4, 214 Name: Please read the following directions. DO NOT TURN THE PAGE UNTIL INSTRUCTED TO DO SO Directions This exam is closed book and closed notes. (You will have access to

More information

Overview. Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland

Overview. Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland Overview Confidence Intervals Sampling and Opinion Polls Error Correcting Codes Number of Pet Unicorns in Ireland Confidence Intervals When a random variable lies in an interval a X b with a specified

More information

Fitting a Straight Line to Data

Fitting a Straight Line to Data Fitting a Straight Line to Data Thanks for your patience. Finally we ll take a shot at real data! The data set in question is baryonic Tully-Fisher data from http://astroweb.cwru.edu/sparc/btfr Lelli2016a.mrt,

More information

WEEK 7 NOTES AND EXERCISES

WEEK 7 NOTES AND EXERCISES WEEK 7 NOTES AND EXERCISES RATES OF CHANGE (STRAIGHT LINES) Rates of change are very important in mathematics. Take for example the speed of a car. It is a measure of how far the car travels over a certain

More information

Joint Probability Distributions and Random Samples (Devore Chapter Five)

Joint Probability Distributions and Random Samples (Devore Chapter Five) Joint Probability Distributions and Random Samples (Devore Chapter Five) 1016-345-01: Probability and Statistics for Engineers Spring 2013 Contents 1 Joint Probability Distributions 2 1.1 Two Discrete

More information

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix) 1 EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix) Taisuke Otsu London School of Economics Summer 2018 A.1. Summation operator (Wooldridge, App. A.1) 2 3 Summation operator For

More information

Introduction to Probability

Introduction to Probability LECTURE NOTES Course 6.041-6.431 M.I.T. FALL 2000 Introduction to Probability Dimitri P. Bertsekas and John N. Tsitsiklis Professors of Electrical Engineering and Computer Science Massachusetts Institute

More information

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES

CLASSICAL PROBABILITY MODES OF CONVERGENCE AND INEQUALITIES CLASSICAL PROBABILITY 2008 2. MODES OF CONVERGENCE AND INEQUALITIES JOHN MORIARTY In many interesting and important situations, the object of interest is influenced by many random factors. If we can construct

More information

Chapter 1 Review of Equations and Inequalities

Chapter 1 Review of Equations and Inequalities Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve

More information

IEOR E4703: Monte-Carlo Simulation

IEOR E4703: Monte-Carlo Simulation IEOR E4703: Monte-Carlo Simulation Output Analysis for Monte-Carlo Martin Haugh Department of Industrial Engineering and Operations Research Columbia University Email: martin.b.haugh@gmail.com Output Analysis

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 16. A Brief Introduction to Continuous Probability

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 16. A Brief Introduction to Continuous Probability CS 7 Discrete Mathematics and Probability Theory Fall 213 Vazirani Note 16 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω, where the

More information

COMPSCI 240: Reasoning Under Uncertainty

COMPSCI 240: Reasoning Under Uncertainty COMPSCI 240: Reasoning Under Uncertainty Andrew Lan and Nic Herndon University of Massachusetts at Amherst Spring 2019 Lecture 20: Central limit theorem & The strong law of large numbers Markov and Chebyshev

More information

STAT 830 Non-parametric Inference Basics

STAT 830 Non-parametric Inference Basics STAT 830 Non-parametric Inference Basics Richard Lockhart Simon Fraser University STAT 801=830 Fall 2012 Richard Lockhart (Simon Fraser University)STAT 830 Non-parametric Inference Basics STAT 801=830

More information

Basic Probability Reference Sheet

Basic Probability Reference Sheet February 27, 2001 Basic Probability Reference Sheet 17.846, 2001 This is intended to be used in addition to, not as a substitute for, a textbook. X is a random variable. This means that X is a variable

More information

2. Variance and Covariance: We will now derive some classic properties of variance and covariance. Assume real-valued random variables X and Y.

2. Variance and Covariance: We will now derive some classic properties of variance and covariance. Assume real-valued random variables X and Y. CS450 Final Review Problems Fall 08 Solutions or worked answers provided Problems -6 are based on the midterm review Identical problems are marked recap] Please consult previous recitations and textbook

More information

Lecture 2: Repetition of probability theory and statistics

Lecture 2: Repetition of probability theory and statistics Algorithms for Uncertainty Quantification SS8, IN2345 Tobias Neckel Scientific Computing in Computer Science TUM Lecture 2: Repetition of probability theory and statistics Concept of Building Block: Prerequisites:

More information

Statistical inference

Statistical inference Statistical inference Contents 1. Main definitions 2. Estimation 3. Testing L. Trapani MSc Induction - Statistical inference 1 1 Introduction: definition and preliminary theory In this chapter, we shall

More information

The Central Limit Theorem

The Central Limit Theorem The Central Limit Theorem Patrick Breheny September 27 Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 1 / 31 Kerrich s experiment Introduction 10,000 coin flips Expectation and

More information

X = X X n, + X 2

X = X X n, + X 2 CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 22 Variance Question: At each time step, I flip a fair coin. If it comes up Heads, I walk one step to the right; if it comes up Tails, I walk

More information

Class 26: review for final exam 18.05, Spring 2014

Class 26: review for final exam 18.05, Spring 2014 Probability Class 26: review for final eam 8.05, Spring 204 Counting Sets Inclusion-eclusion principle Rule of product (multiplication rule) Permutation and combinations Basics Outcome, sample space, event

More information

Fundamental Tools - Probability Theory IV

Fundamental Tools - Probability Theory IV Fundamental Tools - Probability Theory IV MSc Financial Mathematics The University of Warwick October 1, 2015 MSc Financial Mathematics Fundamental Tools - Probability Theory IV 1 / 14 Model-independent

More information

Abstract. 2. We construct several transcendental numbers.

Abstract. 2. We construct several transcendental numbers. Abstract. We prove Liouville s Theorem for the order of approximation by rationals of real algebraic numbers. 2. We construct several transcendental numbers. 3. We define Poissonian Behaviour, and study

More information

{X i } realize. n i=1 X i. Note that again X is a random variable. If we are to

{X i } realize. n i=1 X i. Note that again X is a random variable. If we are to 3 Convergence This topic will overview a variety of extremely powerful analysis results that span statistics, estimation theorem, and big data. It provides a framework to think about how to aggregate more

More information

Continuous Expectation and Variance, the Law of Large Numbers, and the Central Limit Theorem Spring 2014

Continuous Expectation and Variance, the Law of Large Numbers, and the Central Limit Theorem Spring 2014 Continuous Expectation and Variance, the Law of Large Numbers, and the Central Limit Theorem 18.5 Spring 214.5.4.3.2.1-4 -3-2 -1 1 2 3 4 January 1, 217 1 / 31 Expected value Expected value: measure of

More information

Chapter 2. Continuous random variables

Chapter 2. Continuous random variables Chapter 2 Continuous random variables Outline Review of probability: events and probability Random variable Probability and Cumulative distribution function Review of discrete random variable Introduction

More information

Math/Stats 425, Sec. 1, Fall 04: Introduction to Probability. Final Exam: Solutions

Math/Stats 425, Sec. 1, Fall 04: Introduction to Probability. Final Exam: Solutions Math/Stats 45, Sec., Fall 4: Introduction to Probability Final Exam: Solutions. In a game, a contestant is shown two identical envelopes containing money. The contestant does not know how much money is

More information

STAT 414: Introduction to Probability Theory

STAT 414: Introduction to Probability Theory STAT 414: Introduction to Probability Theory Spring 2016; Homework Assignments Latest updated on April 29, 2016 HW1 (Due on Jan. 21) Chapter 1 Problems 1, 8, 9, 10, 11, 18, 19, 26, 28, 30 Theoretical Exercises

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 18

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 18 EECS 7 Discrete Mathematics and Probability Theory Spring 214 Anant Sahai Note 18 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω,

More information

Part IA Probability. Definitions. Based on lectures by R. Weber Notes taken by Dexter Chua. Lent 2015

Part IA Probability. Definitions. Based on lectures by R. Weber Notes taken by Dexter Chua. Lent 2015 Part IA Probability Definitions Based on lectures by R. Weber Notes taken by Dexter Chua Lent 2015 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after lectures.

More information

Functions of Random Variables Notes of STAT 6205 by Dr. Fan

Functions of Random Variables Notes of STAT 6205 by Dr. Fan Functions of Random Variables Notes of STAT 605 by Dr. Fan Overview Chapter 5 Functions of One random variable o o General: distribution function approach Change-of-variable approach Functions of Two random

More information

Slope Fields: Graphing Solutions Without the Solutions

Slope Fields: Graphing Solutions Without the Solutions 8 Slope Fields: Graphing Solutions Without the Solutions Up to now, our efforts have been directed mainly towards finding formulas or equations describing solutions to given differential equations. Then,

More information

Estimation of Quantiles

Estimation of Quantiles 9 Estimation of Quantiles The notion of quantiles was introduced in Section 3.2: recall that a quantile x α for an r.v. X is a constant such that P(X x α )=1 α. (9.1) In this chapter we examine quantiles

More information

EXAM. Exam #1. Math 3342 Summer II, July 21, 2000 ANSWERS

EXAM. Exam #1. Math 3342 Summer II, July 21, 2000 ANSWERS EXAM Exam # Math 3342 Summer II, 2 July 2, 2 ANSWERS i pts. Problem. Consider the following data: 7, 8, 9, 2,, 7, 2, 3. Find the first quartile, the median, and the third quartile. Make a box and whisker

More information

Stats + Homework 2 Review. CS100 TAs

Stats + Homework 2 Review. CS100 TAs Stats + Homework 2 Review CS100 TAs What s on Homework 2? Confidence/Confidence intervals (mean, proportion, difference of each [all Z based]) CLT, LOLN Some hypothesis testing (p-values) Statistical significance

More information

Quiz 1. Name: Instructions: Closed book, notes, and no electronic devices.

Quiz 1. Name: Instructions: Closed book, notes, and no electronic devices. Quiz 1. Name: Instructions: Closed book, notes, and no electronic devices. 1.(10) What is usually true about a parameter of a model? A. It is a known number B. It is determined by the data C. It is an

More information

The Central Limit Theorem

The Central Limit Theorem Introductory Statistics Lectures The Central Limit Theorem Sampling distributions Department of Mathematics Pima Community College Redistribution of this material is prohibited without written permission

More information

Lecture 8 Sampling Theory

Lecture 8 Sampling Theory Lecture 8 Sampling Theory Thais Paiva STA 111 - Summer 2013 Term II July 11, 2013 1 / 25 Thais Paiva STA 111 - Summer 2013 Term II Lecture 8, 07/11/2013 Lecture Plan 1 Sampling Distributions 2 Law of Large

More information

Lecture 2: Review of Basic Probability Theory

Lecture 2: Review of Basic Probability Theory ECE 830 Fall 2010 Statistical Signal Processing instructor: R. Nowak, scribe: R. Nowak Lecture 2: Review of Basic Probability Theory Probabilistic models will be used throughout the course to represent

More information

An analogy from Calculus: limits

An analogy from Calculus: limits COMP 250 Fall 2018 35 - big O Nov. 30, 2018 We have seen several algorithms in the course, and we have loosely characterized their runtimes in terms of the size n of the input. We say that the algorithm

More information

Finding Limits Graphically and Numerically

Finding Limits Graphically and Numerically Finding Limits Graphically and Numerically 1. Welcome to finding limits graphically and numerically. My name is Tuesday Johnson and I m a lecturer at the University of Texas El Paso. 2. With each lecture

More information

Probability and Measure

Probability and Measure Probability and Measure Robert L. Wolpert Institute of Statistics and Decision Sciences Duke University, Durham, NC, USA Convergence of Random Variables 1. Convergence Concepts 1.1. Convergence of Real

More information

Lecture Notes 3 Convergence (Chapter 5)

Lecture Notes 3 Convergence (Chapter 5) Lecture Notes 3 Convergence (Chapter 5) 1 Convergence of Random Variables Let X 1, X 2,... be a sequence of random variables and let X be another random variable. Let F n denote the cdf of X n and let

More information

Distributions of Functions of Random Variables. 5.1 Functions of One Random Variable

Distributions of Functions of Random Variables. 5.1 Functions of One Random Variable Distributions of Functions of Random Variables 5.1 Functions of One Random Variable 5.2 Transformations of Two Random Variables 5.3 Several Random Variables 5.4 The Moment-Generating Function Technique

More information

Algorithms for Uncertainty Quantification

Algorithms for Uncertainty Quantification Algorithms for Uncertainty Quantification Tobias Neckel, Ionuț-Gabriel Farcaș Lehrstuhl Informatik V Summer Semester 2017 Lecture 2: Repetition of probability theory and statistics Example: coin flip Example

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20 CS 70 Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20 Today we shall discuss a measure of how close a random variable tends to be to its expectation. But first we need to see how to compute

More information

Most data analysis starts with some data set; we will call this data set P. It will be composed of a set of n

Most data analysis starts with some data set; we will call this data set P. It will be composed of a set of n 3 Convergence This topic will overview a variety of extremely powerful analysis results that span statistics, estimation theorem, and big data. It provides a framework to think about how to aggregate more

More information

the law of large numbers & the CLT

the law of large numbers & the CLT the law of large numbers & the CLT Probability/Density 0.000 0.005 0.010 0.015 0.020 n = 4 0.0 0.2 0.4 0.6 0.8 1.0 x-bar 1 sums of random variables If X,Y are independent, what is the distribution of Z

More information

{X i } realize. n i=1 X i. Note that again X is a random variable. If we are to

{X i } realize. n i=1 X i. Note that again X is a random variable. If we are to 3 Convergence This topic will overview a variety of extremely powerful analysis results that span statistics, estimation theorem, and big data. It provides a framework to think about how to aggregate more

More information

Homework # , Spring Due 14 May Convergence of the empirical CDF, uniform samples

Homework # , Spring Due 14 May Convergence of the empirical CDF, uniform samples Homework #3 36-754, Spring 27 Due 14 May 27 1 Convergence of the empirical CDF, uniform samples In this problem and the next, X i are IID samples on the real line, with cumulative distribution function

More information

7 Random samples and sampling distributions

7 Random samples and sampling distributions 7 Random samples and sampling distributions 7.1 Introduction - random samples We will use the term experiment in a very general way to refer to some process, procedure or natural phenomena that produces

More information

Lecture 7: Chapter 7. Sums of Random Variables and Long-Term Averages

Lecture 7: Chapter 7. Sums of Random Variables and Long-Term Averages Lecture 7: Chapter 7. Sums of Random Variables and Long-Term Averages ELEC206 Probability and Random Processes, Fall 2014 Gil-Jin Jang gjang@knu.ac.kr School of EE, KNU page 1 / 15 Chapter 7. Sums of Random

More information

Introducing the Normal Distribution

Introducing the Normal Distribution Department of Mathematics Ma 3/103 KC Border Introduction to Probability and Statistics Winter 2017 Lecture 10: Introducing the Normal Distribution Relevant textbook passages: Pitman [5]: Sections 1.2,

More information

M(t) = 1 t. (1 t), 6 M (0) = 20 P (95. X i 110) i=1

M(t) = 1 t. (1 t), 6 M (0) = 20 P (95. X i 110) i=1 Math 66/566 - Midterm Solutions NOTE: These solutions are for both the 66 and 566 exam. The problems are the same until questions and 5. 1. The moment generating function of a random variable X is M(t)

More information

MSc MT15. Further Statistical Methods: MCMC. Lecture 5-6: Markov chains; Metropolis Hastings MCMC. Notes and Practicals available at

MSc MT15. Further Statistical Methods: MCMC. Lecture 5-6: Markov chains; Metropolis Hastings MCMC. Notes and Practicals available at MSc MT15. Further Statistical Methods: MCMC Lecture 5-6: Markov chains; Metropolis Hastings MCMC Notes and Practicals available at www.stats.ox.ac.uk\ nicholls\mscmcmc15 Markov chain Monte Carlo Methods

More information

exp{ (x i) 2 i=1 n i=1 (x i a) 2 (x i ) 2 = exp{ i=1 n i=1 n 2ax i a 2 i=1

exp{ (x i) 2 i=1 n i=1 (x i a) 2 (x i ) 2 = exp{ i=1 n i=1 n 2ax i a 2 i=1 4 Hypothesis testing 4. Simple hypotheses A computer tries to distinguish between two sources of signals. Both sources emit independent signals with normally distributed intensity, the signals of the first

More information

MAT 271E Probability and Statistics

MAT 271E Probability and Statistics MAT 71E Probability and Statistics Spring 013 Instructor : Class Meets : Office Hours : Textbook : Supp. Text : İlker Bayram EEB 1103 ibayram@itu.edu.tr 13.30 1.30, Wednesday EEB 5303 10.00 1.00, Wednesday

More information

Statistics and Sampling distributions

Statistics and Sampling distributions Statistics and Sampling distributions a statistic is a numerical summary of sample data. It is a rv. The distribution of a statistic is called its sampling distribution. The rv s X 1, X 2,, X n are said

More information

Discrete Mathematics and Probability Theory Fall 2015 Note 20. A Brief Introduction to Continuous Probability

Discrete Mathematics and Probability Theory Fall 2015 Note 20. A Brief Introduction to Continuous Probability CS 7 Discrete Mathematics and Probability Theory Fall 215 Note 2 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω, where the number

More information

Sample Spaces, Random Variables

Sample Spaces, Random Variables Sample Spaces, Random Variables Moulinath Banerjee University of Michigan August 3, 22 Probabilities In talking about probabilities, the fundamental object is Ω, the sample space. (elements) in Ω are denoted

More information

Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS

Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS 1a. Under the null hypothesis X has the binomial (100,.5) distribution with E(X) = 50 and SE(X) = 5. So P ( X 50 > 10) is (approximately) two tails

More information

MAS113 Introduction to Probability and Statistics

MAS113 Introduction to Probability and Statistics MAS113 Introduction to Probability and Statistics School of Mathematics and Statistics, University of Sheffield 2018 19 Identically distributed Suppose we have n random variables X 1, X 2,..., X n. Identically

More information

Notes 6 : First and second moment methods

Notes 6 : First and second moment methods Notes 6 : First and second moment methods Math 733-734: Theory of Probability Lecturer: Sebastien Roch References: [Roc, Sections 2.1-2.3]. Recall: THM 6.1 (Markov s inequality) Let X be a non-negative

More information

Spring 2012 Math 541A Exam 1. X i, S 2 = 1 n. n 1. X i I(X i < c), T n =

Spring 2012 Math 541A Exam 1. X i, S 2 = 1 n. n 1. X i I(X i < c), T n = Spring 2012 Math 541A Exam 1 1. (a) Let Z i be independent N(0, 1), i = 1, 2,, n. Are Z = 1 n n Z i and S 2 Z = 1 n 1 n (Z i Z) 2 independent? Prove your claim. (b) Let X 1, X 2,, X n be independent identically

More information

Introduction and Overview STAT 421, SP Course Instructor

Introduction and Overview STAT 421, SP Course Instructor Introduction and Overview STAT 421, SP 212 Prof. Prem K. Goel Mon, Wed, Fri 3:3PM 4:48PM Postle Hall 118 Course Instructor Prof. Goel, Prem E mail: goel.1@osu.edu Office: CH 24C (Cockins Hall) Phone: 614

More information

Review. DS GA 1002 Statistical and Mathematical Models. Carlos Fernandez-Granda

Review. DS GA 1002 Statistical and Mathematical Models.   Carlos Fernandez-Granda Review DS GA 1002 Statistical and Mathematical Models http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall16 Carlos Fernandez-Granda Probability and statistics Probability: Framework for dealing with

More information

Limiting Distributions

Limiting Distributions Limiting Distributions We introduce the mode of convergence for a sequence of random variables, and discuss the convergence in probability and in distribution. The concept of convergence leads us to the

More information

Discrete Distributions

Discrete Distributions Discrete Distributions STA 281 Fall 2011 1 Introduction Previously we defined a random variable to be an experiment with numerical outcomes. Often different random variables are related in that they have

More information

Statistical Data Analysis Stat 3: p-values, parameter estimation

Statistical Data Analysis Stat 3: p-values, parameter estimation Statistical Data Analysis Stat 3: p-values, parameter estimation London Postgraduate Lectures on Particle Physics; University of London MSci course PH4515 Glen Cowan Physics Department Royal Holloway,

More information

f (1 0.5)/n Z =

f (1 0.5)/n Z = Math 466/566 - Homework 4. We want to test a hypothesis involving a population proportion. The unknown population proportion is p. The null hypothesis is p = / and the alternative hypothesis is p > /.

More information

(Re)introduction to Statistics Dan Lizotte

(Re)introduction to Statistics Dan Lizotte (Re)introduction to Statistics Dan Lizotte 2017-01-17 Statistics The systematic collection and arrangement of numerical facts or data of any kind; (also) the branch of science or mathematics concerned

More information

Fall 2017 STAT 532 Homework Peter Hoff. 1. Let P be a probability measure on a collection of sets A.

Fall 2017 STAT 532 Homework Peter Hoff. 1. Let P be a probability measure on a collection of sets A. 1. Let P be a probability measure on a collection of sets A. (a) For each n N, let H n be a set in A such that H n H n+1. Show that P (H n ) monotonically converges to P ( k=1 H k) as n. (b) For each n

More information

Confidence Intervals. Confidence interval for sample mean. Confidence interval for sample mean. Confidence interval for sample mean

Confidence Intervals. Confidence interval for sample mean. Confidence interval for sample mean. Confidence interval for sample mean Confidence Intervals Confidence interval for sample mean The CLT tells us: as the sample size n increases, the sample mean is approximately Normal with mean and standard deviation Thus, we have a standard

More information

STAT 418: Probability and Stochastic Processes

STAT 418: Probability and Stochastic Processes STAT 418: Probability and Stochastic Processes Spring 2016; Homework Assignments Latest updated on April 29, 2016 HW1 (Due on Jan. 21) Chapter 1 Problems 1, 8, 9, 10, 11, 18, 19, 26, 28, 30 Theoretical

More information

CS145: Probability & Computing

CS145: Probability & Computing CS45: Probability & Computing Lecture 5: Concentration Inequalities, Law of Large Numbers, Central Limit Theorem Instructor: Eli Upfal Brown University Computer Science Figure credits: Bertsekas & Tsitsiklis,

More information

Math Review Sheet, Fall 2008

Math Review Sheet, Fall 2008 1 Descriptive Statistics Math 3070-5 Review Sheet, Fall 2008 First we need to know about the relationship among Population Samples Objects The distribution of the population can be given in one of the

More information

1, 0 r 1 f R (r) = 0, otherwise. 1 E(R 2 ) = r 2 f R (r)dr = r 2 3

1, 0 r 1 f R (r) = 0, otherwise. 1 E(R 2 ) = r 2 f R (r)dr = r 2 3 STAT 5 4.43. We are given that a circle s radius R U(, ). the pdf of R is {, r f R (r), otherwise. The area of the circle is A πr. The mean of A is E(A) E(πR ) πe(r ). The second moment of R is ( ) r E(R

More information

Outline. Unit 3: Inferential Statistics for Continuous Data. Outline. Inferential statistics for continuous data. Inferential statistics Preliminaries

Outline. Unit 3: Inferential Statistics for Continuous Data. Outline. Inferential statistics for continuous data. Inferential statistics Preliminaries Unit 3: Inferential Statistics for Continuous Data Statistics for Linguists with R A SIGIL Course Designed by Marco Baroni 1 and Stefan Evert 1 Center for Mind/Brain Sciences (CIMeC) University of Trento,

More information

V. Properties of estimators {Parts C, D & E in this file}

V. Properties of estimators {Parts C, D & E in this file} A. Definitions & Desiderata. model. estimator V. Properties of estimators {Parts C, D & E in this file}. sampling errors and sampling distribution 4. unbiasedness 5. low sampling variance 6. low mean squared

More information

3 Multiple Discrete Random Variables

3 Multiple Discrete Random Variables 3 Multiple Discrete Random Variables 3.1 Joint densities Suppose we have a probability space (Ω, F,P) and now we have two discrete random variables X and Y on it. They have probability mass functions f

More information