The table I have is:

Color of Candy Frequency Proportion (as a fraction and decimal) Percentage
Red 13 13/100 or .13 13%
Orange 25 25/100 or .25 25%
Yellow 8 8/100 or .08 8%
Brown 8 8/100 or .08 8%
Blue 27 27/100 or .27 27%
Green 19 19/100 or .19 19%
TOTALS 100 100/100 or 1 100%
I am trying to answer:
If you wanted to estimate the percentage of each color of candy to within 2 percentage points, how many individual pieces of candy of each color must you sample? Assume you want a 90% confident in your results.

To estimate the percentage of each color of candy within 2 percentage points with 90% confidence, you can use the formula for sample size calculation in a proportion estimation.

The formula for calculating the required sample size is given by:

n = [Z^2 * p * (1 - p)] / E^2

Where:
n = the required sample size
Z = the Z-value corresponding to the desired confidence level (90% confidence corresponds to a Z-value of approximately 1.645)
p = the estimated proportion (percentage of each color of candy)
E = the desired margin of error (2 percentage points)

Let's calculate the required sample size for each color of candy:

1. Red:
Using the proportion (p) of red candies, which is 0.13, the estimated proportion (p) of 0.13, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.13 * (1 - 0.13)] / 0.02^2
n = 4.37437 / 0.0004
n = 10935.925
Rounding up to the nearest whole number, the required sample size for red candies is approximately 10936.

2. Orange:
Using the proportion (p) of orange candies, which is 0.25, the estimated proportion (p) of 0.25, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.25 * (1 - 0.25)] / 0.02^2
n = 10.3428125 / 0.0004
n = 25857.03125
Rounding up to the nearest whole number, the required sample size for orange candies is approximately 25858.

3. Yellow:
Using the proportion (p) of yellow candies, which is 0.08, the estimated proportion (p) of 0.08, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.08 * (1 - 0.08)] / 0.02^2
n = 0.9231136 / 0.0004
n = 2307.784
Rounding up to the nearest whole number, the required sample size for yellow candies is approximately 2308.

4. Brown:
Using the proportion (p) of brown candies, which is 0.08, the estimated proportion (p) of 0.08, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.08 * (1 - 0.08)] / 0.02^2
n = 0.9231136 / 0.0004
n = 2307.784
Rounding up to the nearest whole number, the required sample size for brown candies is approximately 2308.

5. Blue:
Using the proportion (p) of blue candies, which is 0.27, the estimated proportion (p) of 0.27, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.27 * (1 - 0.27)] / 0.02^2
n = 15.571393 / 0.0004
n = 38928.4825
Rounding up to the nearest whole number, the required sample size for blue candies is approximately 38929.

6. Green:
Using the proportion (p) of green candies, which is 0.19, the estimated proportion (p) of 0.19, and the desired margin of error (E) of 0.02, the formula becomes:
n = [1.645^2 * 0.19 * (1 - 0.19)] / 0.02^2
n = 6.216253 / 0.0004
n = 15540.6325
Rounding up to the nearest whole number, the required sample size for green candies is approximately 15541.

In summary, to estimate the percentage of each color of candy to within 2 percentage points with 90% confidence, you would need to sample approximately:
- 10936 red candies
- 25858 orange candies
- 2308 yellow candies
- 2308 brown candies
- 38929 blue candies
- 15541 green candies