Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Math 304 Homework 6: Probability and Statistics, Assignments of Mathematical Statistics

A set of homework problems for math 304, focusing on probability theory and statistics. The tasks involve approximating log functions using uniform generators, calculating confidence intervals, generating random observations from specific probability distributions, and implementing the gibbs algorithm for generating standard normal random variables.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-swx-1
koofers-user-swx-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 304: Homework 6
1. Approximate log2 by using a uniform (0,1) generator. Obtain an error estimation in terms
of a large sample 95% CI. Using R, obtain your estimate for 10,000 simulation and compare
it to the true value.
Hint: Recall that log 2 = R1
0
1
x+1 dx.
2. Similar to the last exercise but now approximate
Z1.96
0
1
2πexp{−t2/2}dt.
3. Determine a method to generate random observations for the following pdf
f(x) = 4x3.
Write an R function to generate a random sample of size nobservations from this pdf. Check
that your function works by calculating a confidence interval for the mean of the distribution.
4. Write an R function to generate random of nobservations for the logistic pdf:
f(x) = ex
(1 + ex)2,−∞ < x < .
Obtain a sample from this distribution and graph the histogram. Overlay a plot of the pdf.
5. Write an R function that uses Gibbs algorithm to generate standard normal random variables.
If
f(x, y) = 1
2π,−∞ < x < ,0< y < ex2/2
the marginal density of Xis standard normal. The conditional distributions are Y|X=x
U(0, ex2/2), and X|Y=yU(2 log y, 2 log y). Start with a number in the support
of X. Obtain a sample from this distribution and graph the histogram. Overlay a plot of the
pdf.
1

Partial preview of the text

Download Math 304 Homework 6: Probability and Statistics and more Assignments Mathematical Statistics in PDF only on Docsity!

Math 304: Homework 6

  1. Approximate log 2 by using a uniform (0,1) generator. Obtain an error estimation in terms of a large sample 95% CI. Using R, obtain your estimate for 10,000 simulation and compare it to the true value. Hint: Recall that log 2 =

∫ (^1) 0

1 x+1 dx.

  1. Similar to the last exercise but now approximate

∫ (^1). 96

0

2 π

exp{−t^2 / 2 } dt.

  1. Determine a method to generate random observations for the following pdf

f (x) = 4x^3.

Write an R function to generate a random sample of size n observations from this pdf. Check that your function works by calculating a confidence interval for the mean of the distribution.

  1. Write an R function to generate random of n observations for the logistic pdf:

f (x) =

e−x (1 + e−x)^2

, −∞ < x < ∞.

Obtain a sample from this distribution and graph the histogram. Overlay a plot of the pdf.

  1. Write an R function that uses Gibbs algorithm to generate standard normal random variables. If f (x, y) =

√^1

2 π

, −∞ < x < ∞, 0 < y < e−x

(^2) / 2

the marginal density of X is standard normal. The conditional distributions are Y |X = x ∼ U (0, ex

(^2) / 2 ), and X|Y = y ∼ U (−

−2 log y,

−2 log y). Start with a number in the support of X. Obtain a sample from this distribution and graph the histogram. Overlay a plot of the pdf.