Question
R Code for the following: Creating Samples in a Jar. Create a variable jar that has 50 red and 50 blue marbles (hint: the jar
R Code for the following: Creating Samples in a Jar. Create a variable jar that has 50 red and 50 blue marbles (hint: the jar can have strings as objects, with some of the strings being red and some of the strings being blue 5. Confirm there are 50 reds by summing the samples that are red 6. Sample 10 marbles (really strings) from the jar. How many are red? What was the percentage of red marbles? 7. Do the sampling 20 times, using the replicate command. This should generate a list of 20 numbers. Each number is the mean of how many reds there were in 10 samples. Use your printVecInfo to see information of the samples. Also generate a histogram of the samples. 8. Repeat #7, but this time, sample the jar 100 times. You should get 20 numbers, this time each number represents the mean of how many reds there were in the 100 samples. Use your printVecInfo to see information of the samples. Also generate a histogram of the samples. 9. Repeat #8, but this time, replicate the sampling 100 times. You should get 100 numbers, this time each number represents the mean of how many reds there were in the 100 samples. Use your printVecInfo to see information of the samples. Also generate a histogram of the samples.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started