Exercise

Exercise 1. Probability of cyan - generalized

In the edX exercises for this section, we calculated some probabilities by hand. Now we'll calculate those probabilities using R.

One ball will be drawn at random from a box containing: 3 cyan balls, 5 magenta balls, and 7 yellow balls.

What is the probability that the ball will be cyan?

Instructions

100 XP
  • Define a variable p as the probability of choosing a cyan ball from the box.
  • Print the value of p.