Question: The following code will randomly generate a vector of 1,000 values, where each generated value has an equal chance of being a 0 or a

The following code will randomly generate a vector of 1,000 values, where each generated value has an equal chance of being a 0 or a 1.

```{r eval=FALSE} rbinom(1000,1,0.5) ```

We will repeat the above line of code 10,000 times using a `for` loop. Each time we run the above line, we will obtain the proportion of zeros generated. We will store the 10,000 proportions of zeros in a vector `x`. Then make a histogram of the `x` vector.

Code should be written using RStudio

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!