[R] Help with Beta Distribution and Transformation method
tbmcea at wm.edu
Thu Feb 25 08:47:55 CET 2010
The following are problems for my Data Analysis course. The professor has
allowed us to use internet help sites such as these to solve the problems
since he didn't teach us how to use R in class.
1. I have learned how many random numbers must be simulated for the Beta
using Acceptance-Rejection method. I need to write an R code/function to
check how many random numbers
must be simulated to generate 1000 samples from the Beta( a= 2; B = 2)
Also, I need to do a simulation study for the following problems
2 . If Z ~N(0; 1), then V = Z^2=x^ 2(1). Draw a random sample of size
100 from V and compare
this with theoretical samples. Summarize the result.
3. If U ~x^2(m) and V ~x^2(n) are independent, then F = (U/m)/
(V/n) has the F distribution with
(m, n) degrees of freedom. Choose the values m = 2 and n = 3. Draw a random
sample of size 100
from F and compare this with theoretical sample. Summarize the result.
4. I f U,V ~Unif(0; 1) are independent , then
(sqrt(-2 log U)) cos(2piV ); Z2 =(sqrt(-2 log V)) sin(2piU)
are independent standard normal [N(0; 1)] variables. Draw a random sample of
size 100 from Z1
and Z2 and compare this with theoretical samples. Summarize the result.
Any help would be greatly appreciated as to how to solve these using R code.
I am a beginner at R and don't know it nearly well enough to solve these.
View this message in context: http://n4.nabble.com/Help-with-Beta-Distribution-and-Transformation-method-tp1568604p1568604.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help