9

I've got two sets of data from some fluorescent cells.

The first set is when the cells don't have their fluorescence switched on, but they are still faintly glowing.

The second set is when they do have their fluorescence switched on.

I ran each of the two experiments three times, so n=3, and I therefore have a mean for each dataset and a SD.

I need to subtract the non-switched on set from the switched on set in order to determine the amount of fluorescence that arises as a result of being switched on.

How do I then calculate the SD of the final value?

I know that for discrete random variables,

$$ E[X+Y] = E[X] + E[Y] $$

So I assume that holds true for subtraction as well, but I can't find the rules for continuous random variables, as these are.

Example data for one data point:

         ON            OFF
MEAN:  33956.6666    3835.66667
SD:    457.47301     38.0905
Charon
  • 203
  • 1
  • 2
  • 5
  • 1
    If you have the original data, you can simple compute the difference between ON and OFF in each sell, and then compute the standard deviation of these difference scores. – Masato Nakazawa Aug 18 '14 at 18:44
  • I can't do that because the data is paired in that way. I.e. it's not the same 3 cells each time. 3 cells were induced to fluoresce and another 3 were not. – Charon Aug 18 '14 at 18:53
  • 1
    Then $\sqrt(s^2_X + s^2_Y)$. – Masato Nakazawa Aug 18 '14 at 19:01
  • Sorry the data is *not* paired in that way, I meant to say. Therefore, does your answer still hold? – Charon Aug 18 '14 at 19:16
  • It does. If they had been paired, the standard deviation would have been $\sqrt{s^2_X + s^2_Y -2cov(X,Y)}$, but hence they are not paired, cov(X,Y) = 0. – Masato Nakazawa Aug 18 '14 at 19:19
  • But surely, if I have 3 of each, I then need to compute the distance between each 3 and then average that value? – Charon Aug 18 '14 at 19:31
  • Or can I just subtract one mean from another and then do $√(s^2_X+s^2_Y)$ ? – Charon Aug 18 '14 at 19:33
  • Also, any chance of a link which explains the background and reasoning? Thanks for helping btw - I do appreciate it. – Charon Aug 18 '14 at 19:36
  • The Wikipedia Entry on the standard deviation would be a great start. – Masato Nakazawa Aug 18 '14 at 19:37
  • This isn't in it though $√(s^2_X+s^2_Y)$ – Charon Aug 18 '14 at 19:39
  • Hmmm seems that the answer is here http://stats.stackexchange.com/questions/25848/how-to-sum-a-standard-deviation . I take it though that even though I'm subtracting the two means I still add the two variances to get the SD, right? – Charon Aug 18 '14 at 19:43

1 Answers1

10

Basic properties of expectation and variance give us:

$$E[aX+bY] = aE[X]+bE[Y]$$

$$\text{Var}[aX+bY] = a^2\text{Var}[X]+b^2\text{Var}[Y]+2ab\text{Cov}[X,Y]$$


a) With $a=1,\,b=-1$ and assuming independence, we have

$$E[X-Y] = E[X]-E[Y]$$

$$\text{Var}[X-Y] = \text{Var}[X]+\text{Var}[Y]$$

Taking square roots yields the result for the standard deviation.

b) With $a=1,\,b=-1$ in the presence of dependence, we have

$$E[X-Y] = E[X]-E[Y]$$

$$\text{Var}[X-Y] = \text{Var}[X]+\text{Var}[Y]-2 \text{Cov}[X,Y]$$

It's not clear to me how the dependence is operating (your description doesn't make it clear which observations are correlated).

If two sets of means are dependent (as "pairs of means"), you could treat the means as paired data.

(Outside of that you might need to look at random effects/mixed effects models.)

Glen_b
  • 257,508
  • 32
  • 553
  • 939
  • They are not independent though – Charon Aug 19 '14 at 09:34
  • It's two samples of the same type of cell. The cells can be induced to fluoresce but, even without having been induced, they will fluoresce a little. One sample has been induced, the other not. Hence, the variables are not independent because if the uninduced fluorescence is high, it will have an effect on the induced fluorescence as well. – Charon Aug 19 '14 at 09:37
  • See edits; feel free to expand on how the dependence is expected to work. – Glen_b Aug 19 '14 at 10:54
  • Well, as I see it, the fluorescence of the induced cells = background fluorescence + fluorescence as a result of inducement. The fluorescence of the uninduced cells = background fluorescence. Therefore, is the former not dependent on the latter? – Charon Aug 19 '14 at 11:28
  • 1
    I don't see that this of itself implies dependence. If the (population mean) background is constant across observations, you would expect to have independence. Even if there's some random noise in the background (so all observations have some common, unknown random shift) then that effect is eliminated when you take the difference in means (so you can still treat them as independent). If there's variation in background that tends to make some observations more alike than others, that would imply some form of dependence that needs to be dealt with. – Glen_b Aug 19 '14 at 12:09
  • Yes, I do see that now and think that you might be right. Could you clarify your last point with an example - I think I get it but not quite. I assume you're saying that if the background changes and that consequently affects the induced measurments to become alike, numerically, then it means that the induced values rely on the background and the two must therefore be dependent? – Charon Aug 19 '14 at 12:34
  • As an example, imagine that the background fluctuates over time in such a way that consecutive observations are more alike than non-consecutive observations. That would make observations that are near to each other in time dependent but observations that are far apart in time might be nearly independent. That form of dependence would need to be accounted for. There are many potential kinds of dependence that you might actually have in particular circumstances. – Glen_b Aug 19 '14 at 12:38
  • Well, by and large the background is constant so I guess that I can call the two independent. Thanks for the help – Charon Aug 19 '14 at 12:41
  • Yes; if we're looking at $(X+B)-(Y+B)=X-Y$ where $B$ is the same both times, then they ($X+B$ and $Y+B$) are not literally independent, but when you deal with their difference the effect of the common background is removed, leaving the independent "backgroundless" variables – Glen_b Sep 12 '17 at 01:22