randFromArray(["bag", "jar", "box", "goblet"]) randFromArray(["marble", "ball", "jelly bean"]) randRange(3, 11) randRange(3, 11) randRange(3, 11) REDMAR + GREENMAR + BLUEMAR rand(2) === 0 randFromArray([["red", REDMAR], ["green", GREENMAR], ["blue", BLUEMAR]]) NOT ? TOTAL - CHOSEN_NUMBER : CHOSEN_NUMBER

A CONTAINER contains REDMAR red MARBLEs, GREENMAR green MARBLEs, and BLUEMAR blue MARBLEs.

If a MARBLE is randomly chosen, what is the probability that it is not CHOSEN_COLOR? Write your answer as a simplified fraction.

NUMBER / TOTAL

There are REDMAR + GREENMAR + BLUEMAR = TOTAL MARBLEs in the CONTAINER.

There are CHOSEN_NUMBER CHOSEN_COLOR MARBLEs. That means TOTAL - CHOSEN_NUMBER = NUMBER are not CHOSEN_COLOR.

The probability is \displaystyle fractionSimplification(NUMBER, TOTAL).

randFromArray([ ["a 1", [1]], ["a 2", [2]], ["a 3", [3]], ["a 4", [4]], ["a 5", [5]], ["a 6", [6]], ["at least 2", [2, 3, 4, 5, 6]], ["at least 3", [3, 4, 5, 6]], ["at least 4", [4, 5, 6]], ["more than 2", [3, 4, 5, 6]], ["more than 3", [4, 5, 6]], ["more than 4", [5, 6]], ["less than 4", [1, 2, 3]], ["less than 5", [1, 2, 3, 4]], ["less than 6", [1, 2, 3, 4, 5]], ["even", [2, 4, 6]], ["even", [2, 4, 6]], ["odd", [1, 3, 5]], ["odd", [1, 3, 5]], ["prime", [2, 3, 5]] ]) RESULT_POSSIBLE.length

A fair six-sided die is rolled. What is the probability that the result is RESULT_DESC? Write your answer as a simplified fraction.

RESULT_COUNT / 6

When rolling a die, there are 6 possibilities: 1, 2, 3, 4, 5, and 6.

In this case, only 1 result is favorable: the number RESULT_POSSIBLE[0].

In this case, RESULT_COUNT results are favorable: toSentence(RESULT_POSSIBLE).

The probability is \displaystyle fractionSimplification(RESULT_COUNT, 6).

randRange(7,12) randRange(3,6) randFromArray(["radius","diameter","circumference"]) randFromArray(["radius","diameter","circumference"]) BIG_GIVEN === "radius" ? BIG_RAD : BIG_RAD*2 SMALL_GIVEN === "radius" ? SMALL_RAD : SMALL_RAD*2 getGCD(Math.pow(SMALL_RAD,2),Math.pow(BIG_RAD,2))

You throw a dart at a circular dartboard with BIG_GIVEN BIG_INFO BIG_GIVEN === "circumference" ? "\\pi" : "". Inside the dartboard is a circular target with SMALL_GIVEN SMALL_INFO SMALL_GIVEN === "circumference" ? "\\pi" : "". Assume you're good enough to hit the dartboard every time, and you'll hit every point on the dartboard with equal probability.

What is the probability that you will hit the target?

Math.pow(SMALL_RAD,2)/Math.pow(BIG_RAD,2)

Since you're equally likely to hit every point on the dartboard, the probability that you hit the target is basically the size of the target divided by the size of the dartboard.

To figure out these sizes, we need to figure out the areas of the target and the dartboard.

The area of the dartboard is \pi r^2, so since BIG_GIVEN === "radius" ? "radius =" + BIG_INFO : (BIG_GIVEN === "diameter" ? "radius = \\frac{diameter}{2}" : "radius = \\frac{circumference}{2 \\pi}"), the area of the dartboard is BIG_RAD^2 \pi.

The area of the target is \pi r^2, so since SMALL_GIVEN === "radius" ? "radius =" + SMALL_INFO : (SMALL_GIVEN === "diameter" ? "radius = \\frac{diameter}{2}" : "radius = \\frac{circumference}{2 \\pi}"), the area of the target is SMALL_RAD^2 \pi.

So, the probability that you will hit the target is \frac{Math.pow(SMALL_RAD,2)}{Math.pow(BIG_RAD,2)} = \frac{Math.pow(SMALL_RAD,2)/GCD}{Math.pow(BIG_RAD,2)/GCD}.

So, the probability that you will hit the target is \frac{Math.pow(SMALL_RAD,2)}{Math.pow(BIG_RAD,2)} .