# Variance (error bars) with a binomial proportion

I have a list of chemicals, their assay test results, and a binomial column of whether or not the assay test result was high enough to be considered a threat (anything >2g/ml). Some chemicals were tested more than once, but others were not. It is understood that it is a poor set of data, but I am trying to be as useful as I can with it. I would like to take into account the variance within the same chemical.

Portion of data:

A .04 0
B 1.2 0
C 4.6 1
D 1.1 0
D 2.3 1
E .03 0
F .27 0
G .92 0
G 3.00 1
G 2.34 1
H 1.36 0
I .80 0
J .45 0
K 1.75 0
L 2.45 1
L 2.60 1
M 5.6 1
N 1.11 0
O 3.14 1
P 0.50 0
Q 1.15 0
Q 2.01 1
R 1.50 0
S .09 0
T .12 0

I am trying to simply calculation the proportion where the binomial column is 1. That part is easy, but I am also trying to inclue standard error or some form of the variance. How can I take into account the variance within a chemical tested more than once?

Related Set Theory, Logic, Probability, Statistics News on Phys.org
Stephen Tashi
Your terminology isn't clear. Do you have a list of "chemicals" or a list of "samples of substances"? If you have a a list of "chemicals", what is being "assayed"? Wouldn't they all be 100% that chemical?

For example is "D" something like "cynanide" and are the "assay" results for "D", two tests run on two different samples of water?

Yes, they are all different samples. The assay is for an amount of gas given off by each of them. "D" happens to be the same chemical that was sampled.

I am trying to show a proportion of the samples that are greater >2g/ml. Just showing the binomial variation may underestimate the total variation...because there is also variation when the sample chemical is tested more than once. How can I tie this variation into my proportion variation?

Stephen Tashi