What you are describing is a t-test.
More specifically, an independent two-sample t-test with presumably equal variances.
As an example, after 100 measurements of red balls, and 100 measurements of green balls, your t-score is:
This assumes you have properly determined Y(R) and Y(G).
Then you would have to look it up in a t-test table, specifying df=2x100-2=198.
This will give you the confidence level you ask for.
The proper procedure is:
- Calculate the t-score with the given formula (see here).
- Look up p-value that corresponds with this t-score.
You will need to specify the degrees of freedom (df) as given in the article.
You can do this with a graphical calculator, SPSS, Excel, an online calculator, or whatnot.
- If this p-value is smaller than 0.05, you can say with a confidence of 95% that the diameters are different.
Or with an even smaller p-value, you can say with a confidence of (1-2p)x100% that the diameters are different.