Help using Base SAS procedures

Is there way to random generate data use user defined equations?

Reply
N/A
Posts: 1

Is there way to random generate data use user defined equations?

I have a simple simulation question from professor, although it don't require to use SAS to do it. but i want know if it is possible, how to do those?

two questions is

1. Generate a random sample of size 10 (1,000,000 if use computer) from distribution with MGF=(1/8)e^t+(1/4)e^2t+(5/8)e^(5t) and compare the sample mean with expected value.

2. Generate a random sample of size 10 (1,000,000 if use computer) from distribution with CDF of mixed type:

F(x)=0 x<0

      =1/4, 0<=x<1/4

      =x, 1/4<=x<3/4

      =3/4, 3/4<=x<1

      =1,    x>=1

and compare the sample mean with expected value.

My question is how to generate those random samples from those 2 and how to find the sample mean? just "proc mean the sample got generated will do?

Ask a Question
Discussion stats
  • 0 replies
  • 152 views
  • 0 likes
  • 1 in conversation