Question: HELP! I'm not a computer person at all need help with R 1. Write a sample command that replicates flipping a fair coin 100 times...

HELP! I'm not a computer person at all need help with RHELP! I'm not a computer person at all need help with R

1. Write a "sample" command that replicates flipping a fair coin 100 times... (a) using string coding "heads" and "tails" (b) using the numerical coding 1 (for heads) and 0 (for tails) For each part, run the code 10 separate times and look at the output. 2. Suppose that we have a biased coin that has a 85% chance of landing on heads on each flip. Write a "sample" command that replicates flipping a fair coin 100 times... (a) using string coding "heads" and "tails" (b) using the numerical coding 1 (for heads) and 0 (for tails) For each part, run the code 10 separate times and look at the output. Suggestion: Use the "prob - ..." optional setting. Look at the R's help on "sample" and/or search google for help on R's sample. (c) Can you do part(s) (a), (b) without using the "prob = ..." optional setting? Write a "sample" command that replicates (randomly) drawing 3 balls from the urn, if 3. (a) Suppose that we have an urn with 5 "red" balls, 8 "green" balls, and 2 "yellow" balls. the sampling is done without replacement. Run the command and look at the output. (b) Repeat part (a) if we draw 10 balls. (c) Repeat part (a) if we draw 18 balls. 4 Repeat all parts of #3. if the sampling is done with replacement. 1. Write a "sample" command that replicates flipping a fair coin 100 times... (a) using string coding "heads" and "tails" (b) using the numerical coding 1 (for heads) and 0 (for tails) For each part, run the code 10 separate times and look at the output. 2. Suppose that we have a biased coin that has a 85% chance of landing on heads on each flip. Write a "sample" command that replicates flipping a fair coin 100 times... (a) using string coding "heads" and "tails" (b) using the numerical coding 1 (for heads) and 0 (for tails) For each part, run the code 10 separate times and look at the output. Suggestion: Use the "prob - ..." optional setting. Look at the R's help on "sample" and/or search google for help on R's sample. (c) Can you do part(s) (a), (b) without using the "prob = ..." optional setting? Write a "sample" command that replicates (randomly) drawing 3 balls from the urn, if 3. (a) Suppose that we have an urn with 5 "red" balls, 8 "green" balls, and 2 "yellow" balls. the sampling is done without replacement. Run the command and look at the output. (b) Repeat part (a) if we draw 10 balls. (c) Repeat part (a) if we draw 18 balls. 4 Repeat all parts of #3. if the sampling is done with replacement

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!