Question: Please do this in R programming language. Draw a random sample of size n=20 from a uniform distribution in 0 and 1 using runif(20). Sequentially,

Please do this in R programming language.

Draw a random sample of size n=20 from a uniform distribution in 0 and 1 using runif(20). Sequentially, print values using the following rules:

i. Print a value if it is less than 0.3 or more than 0.8, but skip it (dont print the value) if it is in (0.1, 0.2],

ii. Skip the entire process if you find a value in [0.4,0.5].

Hint: use for, while, repeat, break, next

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!