Question

Using R Studio, Generate a standard normal random. using rnorm() Check whether this number is >1.96...

Using R Studio,

Generate a standard normal random. using rnorm()

Check whether this number is >1.96 or <-1.96.

Replicate this 1000 times and count the number of observations that are greater than 1.96 or less than -1.96.

Calculate the ratio of this number to the the number of replications and see whether this is close to 0.05.

HINT:

num <- 0

for (i in 1 : 1000) {

a <-

}

num/1000

0 0
Add a comment Improve this question Transcribed image text
Answer #1

To generate standard normal variable

rnorm(1,0,1)

[1] -0.5811594

The number is not >1.96 or <-1.96

Replication

num <- 0

for (i in 1 : 1000) {

a=rnorm(1,0,1)

if(a>1.96||a<(-1.96))

{num=num+1}

}

num

[1] 53

There are 53 observations <-1.96 or

> 1.96

Required ratio

num/1000

[1] 0.053

The number is close to 0.05

Add a comment
Know the answer?
Add Answer to:
Using R Studio, Generate a standard normal random. using rnorm() Check whether this number is >1.96...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT