Question

Show how to use Metropolis Algorithm to generate a random variable
with an approximate student’s t distribution with v degrees of
freedom, starting from N(0,1) random variables.

(Not using programming codes)

Answer #1

How do I use transformations to generate directly a
random variable with a Student's t distribution with v degrees of
freedom?

how do you generate data for a y random variable in matlab?
If x has uniform distribution (0,1)
y has uniform distribution (a,b)
Then write a matlab code using rand() command to generate data
from distribution of y
y = ? + ?x
a,b, rand()

Let U be a random variable that is uniformly distributed on (0;
1), show how to use U to generate the following random variables:
(a) Bernoulli random variable with parameter p; (b) Binomial random
variable with parameter n and p; (c) Geometric random variable with
parameter p.

Use R to code a function to generate a random sample of size n
from the Beta(a, b) distribution by the acceptance-rejection
method.
(1) Generate a random sample of size 3000 from the Beta(4,3)
distribution.
(2) Graph the histogram of the sample with the theoretical
Beta(4,3) density superimposed.
Answer the above questions by showing the R codes and
results.

5.2.12. Let the random variable Zn have a Poisson distribution
with parameter μ = n. Show that the limiting distribution of the
random variable Yn =(Zn−n)/√n is normal with mean zero and variance
1.
(Hint: by using the CLT, first show Zn is the sum
of a random sample of size n from a Poisson random variable with
mean 1.)

Use a t-distribution to answer this question. Assume
the samples are random samples from distributions that are
reasonably normally distributed, and that a t-statistic
will be used for inference about the difference in sample means.
State the degrees of freedom used.
Find the endpoints of the t-distribution with 2.5% beyond
them in each tail if the samples have sizes n1=16 and n2=23.
Enter the exact answer for the degrees of freedom and round your
answer for the endpoints to two...

How to do the following in R:
Write a function to generate a random sample of size n from the
Gamma(α,1) distribution by the
acceptance-rejection method. Generate a random sample of size 1000
from the Gamma(3,1) distribution. (Hint: you may use g(x) ∼
Exp(λ = 1/α) as your proposal distribution, where λ is the
rate parameter. Figure out the appropriate constant c).

How to do the following in R:
Write a function to generate a random sample of size n from the
Gamma(α,1) distribution by the acceptance-rejection method.
Generate a random sample of size 1000 from the Gamma(3,1)
distribution. (Hint: you may use g(x) ∼ Exp(λ = 1/α) as your
proposal distribution, where λ is the rate parameter. Figure out
the appropriate constant c).

A random sample of 25 values is drawn from a mound-shaped and
symmetrical
distribution. The sample mean is 10 and the sample standard
deviation is 2.
Use a level of significance of 0.05 to conduct a two-tailed test of
the claim that the
population mean is 9.5.
(a) Is it appropriate to use a Student’s t distribution?
Explain. How many degrees of freedom do we use?
(b) What are the hypotheses?
(c) Calculate the sample test statistic t.
(d) Estimate...

Use the t-distribution
and the sample results to complete the following test of the
hypotheses. Use a 5% significance level.
Test Ho : μ = 500 vs
Ha : μ ≠ 500 using the sample results x ¯ = 432, s = 118, with n =
75.
a) Discuss whether it
is OK to use the t-distribution to determine the results
of the test. The underlying distribution is skewed to the right
with several outliers.
b) How many degrees of...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 6 minutes ago

asked 53 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 2 hours ago

asked 2 hours ago

asked 2 hours ago

asked 2 hours ago

asked 3 hours ago

asked 4 hours ago