5

13 Assumc random variable X follows the Beta(a,b) distribution with pdfT(a + 6) f(r) = 1"-1(1-1)-1 0 <I <1 a > 0,6 > 0. T(a)r(6)Calculate the mcan ...

Question

13 Assumc random variable X follows the Beta(a,b) distribution with pdfT(a + 6) f(r) = 1"-1(1-1)-1 0 <I <1 a > 0,6 > 0. T(a)r(6)Calculate the mcan valuc E(X) of X. To gencrate random variable X from this distribution bascd thc Acccpt-Reject mcthod_ aSSuMIC 3,6 use U(0,1) (Uniform distribution on [0, 1]) as proposal or an instrumental distribution: Fiud the possible minimum value of M for the Accept-Reject method and calculate the thcorctical acceptance ratc for this simulatio

13 Assumc random variable X follows the Beta(a,b) distribution with pdf T(a + 6) f(r) = 1"-1(1-1)-1 0 <I <1 a > 0,6 > 0. T(a)r(6) Calculate the mcan valuc E(X) of X. To gencrate random variable X from this distribution bascd thc Acccpt-Reject mcthod_ aSSuMIC 3,6 use U(0,1) (Uniform distribution on [0, 1]) as proposal or an instrumental distribution: Fiud the possible minimum value of M for the Accept-Reject method and calculate the thcorctical acceptance ratc for this simulation; Write an R program (0 generate random sample of size NSim 10 ' using the method stated part (6) Caleulate the sample mcnn of your generatel random sample and compare i t0 thie thevretical [ean value E(X obtained in (a). Compare your prOgram with the built-in R functions rbeta using histograms with superimposed true density curve, Include your R code and graphs,



Answers

As discussed previously, the normal distribution cannot be simulated using the inverse cdf method. One possibility for simulating from a standard normal distribution is to employ the accept-reject method with candidate distribution
$$g(x)=\frac{1}{\pi\left(1+x^{2}\right)} \quad-\infty< x<\infty$$
(This is the Cauchy distribution.)
(a) Find the cdf and inverse cdf corresponding to $g(x) .$ (This will allow us to simulate values from the candidate distribution.)
(b) Find the smallest majorization constant $c$ so that $f(x) / g(x) \leq c$ for all $x,$ where $f(x)$ is the standard normal pdf. [Hint: Use calculus to determine where the ratio $f(x) / g(x)$ is maximized.]
(c) On the average, how many candidate values will be required to generate $10,000$ "accepted" values?
(d) Write a program to construct 10,000 values from a standard normal distribution.
(e) Suppose that you now wish to simulate from a $N(\mu, \sigma)$ distribution. How would you modify your program in part $(\mathrm{d}) ?$

All right, We have this probability distribution function, so it's a slight generalization of the exponential distribution each minus X to me. All right. And so this is from zero to infinity X in that range. Now we're going to set A to B for B B one four five, and then we're going to put the effective Ah, women. We can say this is about three. So instead of integrating all the way to infinity, we could just integrate two three, because after that point, it'Ll the distribution will essentially be zero. Okay, So first of all, I want to find the average the expected dying, and this is just well, it's approximately equal to it's here to three. And then we just plug in all of our numbers. Six. So you put our weight of X and there on six next to the B minus one, which is Europe one five, and then e to the minus for next one point five. And just using the integration feature on micro graphing calculator. Get this is your a point three five eight three now for the standard distribution. So sigma squared, which is the variance, is just well is approximately equal to your girls. Your three. And then we have X minus. Well, in this case, mu squared times six times x to the zero point five each of the negative for extra the one point five the ex. And this is, um So this is going to give us the variance in approximately for the variance and everyday square root we'LL get the The standard deviation is about zero point two four three two.

We want to do is we actually want to do some investigation on what is called the normal probability distribution function. And that function um is of the form F of X is equal to one over um delta Square root of two pi E to the negative one half. And then over here we have x minus mu over delta squared um where mu is known as the mean of the distribution or also, which is called this center. And then of course, delta is what is called the standard deviation, which is also known as the spread or the scatter, which we also know that the integral from negative infinity to positive infinity of this function is actually equal to one. And so we want to do some of our own investigation. And so the first thing we're gonna do is one, we're going to kind of make this a little bit simpler. We're going to let the mean equal zero and the standard deviation equal to one. So that's going to simplify or function just a bit. So f of X Is equal to one over the square root of two pi E. To the negative one, half X squared. Okay. And we want to kind of know what this graph looks like, and so we're going to actually do that by hand by incorporating some of our derivatives and what we know about increasing, decreasing with respect to our derivative. So the first thing we need to do is take our derivative of our function. So one over the square root of two pies, just a constant number and the derivative of either the U. Is you prime. So we're going to take the derivative of the exponents, which is equal to negative X. And then E to the negative E. To the U. Which is going to be E to the negative one, half X squared. Yeah. Okay. So now where does this derivative get a zero? Well, we know that the exponential function never goes to never will equal zero. So the only time that this derivative will equal zero is when X equals zero this part right here. Okay. So we're gonna divide our interval because we we know that the domain for this function is negative infinity to positive infinity. And so we're gonna go from negative infinity is zero and 0 to positive infinity. We're going to pick a test point. So -1 and one. So my derivative evaluated at -1 is going to be positive. So I know my function is increasing over that in a role and now we're gonna take the derivative of one. Which we now know that derivative will be negative for that particular case. And so we now know that our function is decreasing. So where my function goes from increasing to decreasing. I know I have a relative max and that relative max zero comma one over the square root of two pi. Okay so that's what we have now. So now we can do kind of a quick sketch. So I know that what does this function look like? It has a relative max at zero and 1 over the screw to two pi. And now it is it will be um increasing from negative infinity to zero and in decreasing from 02 infinity. So that's kind of what it looks like. Okay and so now you can almost say that it is actually an even function, right? So it's going to be an even function. It looks pretty symmetrical. So this is actually going to be an even function. Okay, so that's the first thing what we wanted to do is just kind of take a graph of it. Now we actually want to transition to a graphing calculator and we want to actually evaluate Um from the integral from negative end to end of one over the square root of two pi E to the negative one half X squared dx. And we want to do it for in equal one In equal to and in equal to three. So that's what we're gonna do. And we're going to see does it look like as in increases um does that um approach some single value? So let's go ahead and switch over. I have this actually over here and so you know, I already have it Graff diamond gizmos. Um I like Desmond's because you actually will do the evaluation for you. Um And so if I Go from -1 To positive one, I noticed I get .6 8-7. And now if I change my limits, the two And -2 I get .9545. So it does look like it's approaching and it looks like it actually is approaching what we think it should be or what we were told that it was and that was one right now. .97300. Okay, so let's go back and put that in there. So now we know that The integral from negative 1 to 1 of one over the square to two pi E to the negative one half X squared dx is about point 6827. The integral from -2- two. Of the function was 0.9 545 And in the integral from -323 was .99 Something so .9973. Okay. Um and now what we want to do a third step is actually um try to give in support of this. Also give an argument um that the integral from negative infinity to positive infinity of that function Actually does equal one. Okay. Um and it gave us some hints um your book gave us a little bit of hints. Um The book gave us a hint um that what we want to do is for X values greater than one. We want to actually show um that um from zero less than E to the negative one half X squared is actually less than E to the negative X over two. Okay. So how are we gonna do this? And I'm just going to start with this X greater than one. So I know that X squared is going to be greater than next. So if X is greater than one, that I know X squared is going to be greater than next. Um I know that X squared over two, it's going to be greater than X over two. And now if I change my signs, I have to flip the direction of the inequality and now if I raise both sides by E, I have now shown and we're going to do it for values greater than zero. That um my original function is in fact less than um E to the negative X over two. Okay, so now what I want to show is that for Be greater than one, that the integral from B to infinity of E to the negative X over two. D. X actually does go 20 Okay. Um and so we're gonna go ahead and get that started. So we know that the limit as B goes to infinity of the in a goal from B to infinity you have eaten the next X. Oh X over two D. X. Okay. Um and so this is as B approaches infinity. Okay, so now what we want to do is if I can show that this converges, then I know that my original function since it's less than that also converges now what it converges to, I'm not sure but I know that it converges and if I actually show that this converges to zero um for B values greater than one, then I can almost estimate that my other function for X values for B values greater than one will actually approach zero as well, which means most of my um region is going to be contained in that um in equal one in equal to in equal three, if that makes sense. Um Okay, so let's go ahead and get started. So um now if I do um a use up so I'm gonna let you be one half negative one half X. Then do you? Is equal to negative one half D. X. Which means that D. X. Is equal to negative to do you? Okay. And you notice I did leave off that one over the square root of two pi. Um Which is just a constant number. So this is going to be negative too. The limit as big as infinity of the integral of be. Oh so let's change our upper and lower limits since we're changing variables. So if X. Is be then this is negative lips negative B. Over to and if X is infinity this is negative infinity each of the you do you? Okay and so now what I can do is if I switch my upper and lower limits then I changed a sign of the two. So this is going to go from negative infinity to negative B over to either the U. Do you. Okay. And so the integral of each of the you is just either the U. And so this is going to be too times the limit as B goes to infinity of either the U. Evaluated at negative B over two and at negative infinity. So this will be equal to two. This will be the limit as he goes to infinity of E. To the negative B over to minus E to the negative infinity. So um this will actually go to zero because this is one over E. To the infinity. This will this this term will go to zero and then I will do the exact same thing here. Right? So if be as infinity, this will be negative infinity over two, which is in essence negative infinity. So that goes to zero. And so what that is telling me here is that up here for X values and this is my argument for X values greater than one And be value greater than one. That this area actually goes 2 0. And so most of most of that integration is in between these two values which now we know that based off of our ends, we know that this actually kept going got closer 21 right. And so it's going to actually get to the point where it's going to go to one and then substance subsequently um this will go to zero here and then I'll just have most of this and contained as one. That makes sense. I hope this helped help you understood what I was trying to say.

Okay, so this is another question where we're really actually just gonna be plugging everything into a calculator to solve it, But I'll show you what this set up is going to look like. Um, so we've got here a distribution affects that is described using some variables a B and ex. Um, and it is called the Waibel distribution. Um, And for our question, we're told that a equals four vehicles 1.5, and we want to do the Simpson approximation with an equals 100. So we're going to set up the integral from 0 to 3. And the reason we're using three instead of our normal profound infinity is because that's what the question tells us to do whenever we're dealing with approximations. We don't want to work with infinities, so we just pick a number that's going to be big enough. Um, so then we're gonna set up are integral. So we're gonna put in our, um uh okay. So the first thing that we want to find about this distribution is it's expected value. So we're gonna do that integral. We can plug in our A and B s. So we get six x to the 0.5 power you to the negative for X to the 0.5 power on the whole thing times x dx. So instead of solving, uh, this integral, we're going to plug it into Ah, our graphing calculator for the Simpsons rule. Uh, and we'll get approximately 0.3 583 for that. Um, actually, here I can pull up a picture. If we don't remember the formula for The Simpsons rule, why don't we go ahead and look at bat to jog her memory? Um, but again, this is all going to be done with your calculator from here. Once we have our expected value, our next step is that we're trying to find the standard deviation. So we're going to start by finding expected X squared. So it'll be similar integral, but it'll be times X squared instead of X. And then when we get this result, uh, we'll call it kept pie. When we get cap, I we're gonna subtract off 0.3583 squared, cause that's our formula for variants. And then we'll take the square root of the whole thing to get our standard deviation. And that is approximately equal. 2.2432 So this and this are your final answers for this question.

We're going to simulate the half normal distribution whose pdf is shown here using the accept reject method with the candidate distribution G of X is equal to eat The minus X for part A were asked to find the inverse CDF corresponding to G of X, which will allow us to simulate values from this distribution. This is simply the exponential distribution with Lambda set to one. So we know that at CDF is given by the following. And now to find the inverse CDF, we can set you equal to GRX and then solve for X. And we have negative log of one minus you. So that is the inverse CDF of GDX Next for part B were asked to find the smallest major ization constant that is, we want to find the smallest constant such that it is always at least a zbig as f X over GDX. So if we find FX over GDX, we get the following. So now we want to find the maximum value that this could possibly be and set that exactly equal to see or rather set see exactly to that this maximum occurs when this is maximized and weaken. Find except corresponds to the maximum of that by setting the first derivative of this value equal to zero, and we end up with X is equal to one. So if we plug one into the equation, we have C is equal to the square root of two over pie 10 z to the exponents. One half that's about 1.3155 Then for part C, we're asked for the expected number of candidate values that would be required to generate 10,000 accepted values. So this is given by end time, see and as the number of accepted values that are desired. So that's 10,000 time see, and it gives us 13,000 155. So on average, we would need to generate 13,155 candidate values to end up with 10,000 accepted values. And finally, for part D were s to write a program to simulate 10,000 values from the half normal distribution. Now the acceptance criterion is given by the random uniformed variable that has drawn time see times are candidate distribution being at most equal to the density at why and just rearranging this we have you is listener equal to you? Is that why? Divided by G. L Y divided by a C that we already have f over g right here and we have C so this could be simplified to the following. So the steps for the program are one. We draw a random variable from our candidate distribution. So we call that why to we draw from the the uniform distribution, the standard uniform distribution and then three we test our criterion. So if our criterion is met, then we accept the generated value and then we repeat these three steps until we have 10,000 variants and then we will have 10,000 vary. It's from the half normal distribution. So the R code that I produced looks like this. So in step one, we draw from our candidate distribution using the inverse CDF method. In step two, we draw from the uniform standard uniform distribution and Step three. We test our acceptance criterion. If it's accepted, then value gets placed in the Vector X, and it gets repeated until we have a vector X of size 10,000


Similar Solved Questions

5 answers
What is the mass (in grams) of 9.75 * 1024 molecules of methanol (CHJOH)?Number
What is the mass (in grams) of 9.75 * 1024 molecules of methanol (CHJOH)? Number...
5 answers
Ksl(b) Find € such that21 8) "=( = -4)
ksl (b) Find € such that 21 8) "=( = -4)...
5 answers
Kek f (3) = Ik+I , 8 _
kek f (3) = Ik+I , 8 _...
5 answers
Ansorhance400dSoOO25002000 WavrnUnher s1500Iooos00
Ansorhance 400d SoOO 2500 2000 WavrnUnher s 1500 Iooo s00...
5 answers
Positive charge of 5C and mass 25 is Placed parricle?an unitorm lectric field of 10 NIC. Whatacceleration 0t thework #id Me ,+ + 13mi- Wmx 1.0mtt" Pvi 3,0 m1
positive charge of 5C and mass 25 is Placed parricle? an unitorm lectric field of 10 NIC. What acceleration 0t the work #id Me , + + 1 3mi- Wmx 1.0mtt" Pvi 3,0 m1...
5 answers
$lim _{n ightarrow infty}(1+x)left(1+x^{2}ight)left(1+x^{4}ight) ldotsleft(1+x^{2 n}ight),|x|<1$, is equal to(A) $frac{1}{x-1}$(B) $frac{1}{1-x}$(C) $1-x$(D) $x-1$
$lim _{n ightarrow infty}(1+x)left(1+x^{2} ight)left(1+x^{4} ight) ldotsleft(1+x^{2 n} ight),|x|<1$, is equal to (A) $frac{1}{x-1}$ (B) $frac{1}{1-x}$ (C) $1-x$ (D) $x-1$...
5 answers
Let 6; =73so that {v1,72,"s} is an orthogonal set(No need t0 verily this fact.(a) Find a vector € such that {01.82,Us, U4} is an Orthogonal set. (b) Give an example of an orthonormal set in Rtand justify.
Let 6; = 73 so that {v1,72,"s} is an orthogonal set (No need t0 verily this fact. (a) Find a vector € such that {01.82,Us, U4} is an Orthogonal set. (b) Give an example of an orthonormal set in Rtand justify....
5 answers
Consumer Price Index(a) The CPI was 229.39 for 2012 and 243.80 for 2017 . Assuming that annual inflation remained constant for this time period, determine the average annual inflation rate.(b) Using the inflation rate from part (a), in what year will the CPI reach $300 ?$
Consumer Price Index (a) The CPI was 229.39 for 2012 and 243.80 for 2017 . Assuming that annual inflation remained constant for this time period, determine the average annual inflation rate. (b) Using the inflation rate from part (a), in what year will the CPI reach $300 ?$...
5 answers
4 What is the torque produced about point A? (1)5 mF=125 N0.25 m
4 What is the torque produced about point A? (1) 5 m F=125 N 0.25 m...
5 answers
________ No individual development data
________ No individual development data...
1 answers
Solve each radical equation. Check your solution. If there is no solution, write no solution. $$ \sqrt{r+5}=2 \sqrt{r-1} $$
Solve each radical equation. Check your solution. If there is no solution, write no solution. $$ \sqrt{r+5}=2 \sqrt{r-1} $$...
5 answers
Prove that if n2+ 2n is even, then n is even.
Prove that if n2+ 2n is even, then n is even....
4 answers
2- Plot the phase portrait using the isoclines method forthe systems below: Use several values forthe slope c. For examplec-2,-1,,0, 1,2. Try to predict the path of the trajectory starting at some initial point: Verify using dfield and pplane(a) x =x-t (b) *+x+x = 0
2- Plot the phase portrait using the isoclines method forthe systems below: Use several values forthe slope c. For examplec-2,-1,,0, 1,2. Try to predict the path of the trajectory starting at some initial point: Verify using dfield and pplane (a) x =x-t (b) *+x+x = 0...
5 answers
Eusmtntaehodltetder uth %uucanhent_ Eltuaeul Tha mnaem Gela 11844 02740 31412 4ocds Aare Ku4ujanl 5u7 Worlmeute Earulal nnnWenaidduen tdune ntmneeatnlo unattuMrdml
eusmtnt aehodltetder uth %uucanhent_ Eltuaeul Tha mnaem Gela 11844 02740 31412 4ocds Aare Ku4ujanl 5u7 Worlmeute Earulal nnn Wenai dduen t dune nt mne eatnlo unattu Mrdml...
5 answers
(II) A 95-kg fullback is running at 3.0 m/s to the east and is stopped in 0.85 s by a head-on tackle by a tackler running due west. Calculate $(a)$ the original momentum of the fullback, $(b)$ the impulse exerted on the fullback, $(c)$ the impulse exerted on the tackler, and $(d)$ the average force exerted on the tackler.
(II) A 95-kg fullback is running at 3.0 m/s to the east and is stopped in 0.85 s by a head-on tackle by a tackler running due west. Calculate $(a)$ the original momentum of the fullback, $(b)$ the impulse exerted on the fullback, $(c)$ the impulse exerted on the tackler, and $(d)$ the average force ...
5 answers
DzEvaluate:(2 +4)+4)tan-1 (€)+ +C 16 (2 +4)f (2) =None of the above+4) tan-1 (H)+ 0+ 16 (22 + 4)(2) f(2 +4) tan-1 (e) - 1 - f () = +C 16(2 +4)(22 + A)tan-!(E)+2 f () = +C 16 (22 + 4)
dz Evaluate: (2 +4) +4)tan-1 (€)+ +C 16 (2 +4) f (2) = None of the above +4) tan-1 (H)+ 0+ 16 (22 + 4) (2) f (2 +4) tan-1 (e) - 1 - f () = +C 16(2 +4) (22 + A)tan-!(E)+2 f () = +C 16 (22 + 4)...
5 answers
At what times in the interval 0 < + < # are the velocity and accelera - tion vectors of the motionr() =i+(5cos(())i + (3sin())korthogonal?
At what times in the interval 0 < + < # are the velocity and accelera - tion vectors of the motion r() =i+(5cos(())i + (3sin())k orthogonal?...

-- 0.018492--