Is pooled sample variance equal to the combined sample variance? We use the following formula
S2p=(n1−1)S2X+(m−1)S2Yn+m−2
and check if pooled variance, computed for two or more samples, matches the the variance of all samples combined into one large sample. We compute the statistics of every interval separately, when all samples compbined into one large sample. If we have two samples, we compute also statistics for the difference of two samples and confidence intervals of their differences as if two samples (aka groups) are unpaird.
Use new lines to separate samples and commas or whitespaces to separate the sample elements.
S2p=(n1−1)S2X+(m−1)S2Yn+m−2
and check if pooled variance, computed for two or more samples, matches the the variance of all samples combined into one large sample. We compute the statistics of every interval separately, when all samples compbined into one large sample. If we have two samples, we compute also statistics for the difference of two samples and confidence intervals of their differences as if two samples (aka groups) are unpaird.
Use new lines to separate samples and commas or whitespaces to separate the sample elements.
- I have noticed that samples may be very grouped so that there is little variance within them so that pooled will be close to zero. It seems that the variance of the combined sample should be always larger for the same reason.
sample 1: 0,0,0,0
. n = 4, x = 0, S = 0 t-interval
sample 2: 10,10,10,10
. n = 4, x = 10, S = 0 t-interval
sample combined: 0,0,0,0,10,10,10,10
. n = 8, x = 5, S = 5.3452248382484875 t-interval
Pooled sample variance 0 != 28.57142857142857 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: -10,-10,-10,-10
. n = 4, x = -10, S = 0 t-interval - The opposite seems possible, however, yet. You see, the aggregate sample variance is lower than pooled. I explain this by lower denominator of the pooled variance: whereas we divide by Bessel's -1 in the normal sample variance, we divide by -NumOfGroups in the pooled.
sample 1: 0,1,2
. n = 3, x = 1, S = 1 t-interval
sample 2: 0,1,2
. n = 3, x = 1, S = 1 t-interval
sample combined: 0,1,2,0,1,2
. n = 6, x = 1, S = 0.8944271909999159 t-interval
Pooled sample variance 1 != 0.7999999999999999 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: 0,0,0
. n = 3, x = 0, S = 0 t-interval
sample 1: 0,1
. n = 2, x = 0.5, S = 0.7071067811865476 t-interval
sample 2: 2,0,1,2
. n = 4, x = 1.25, S = 0.9574271077563381 t-interval
sample combined: 0,1,2,0,1,2
. n = 6, x = 1, S = 0.8944271909999159 t-interval
Pooled sample variance 0.8125 != 0.7999999999999999 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample 1: 0,1,2
. n = 3, x = 1, S = 1 t-interval
sample 2: 3,4,5
. n = 3, x = 4, S = 1 t-interval
sample combined: 0,1,2,3,4,5
. n = 6, x = 2.5, S = 1.8708286933869707 t-interval
Pooled sample variance 1 != 3.5 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: -3,-3,-3
. n = 3, x = -3, S = 0 t-interval- This example must give (10.26−9.02)±2.101(2.226)√1/10+1/10 where 10.26−9.02 is the difference of sample means, 2.101=t0.025,18 is the normalized 95% t-interval for 20 samples and 2.226 is the pooled standard deviation.
sample 1: 12.9,10.2,7.4,7,10.5,11.9,7.1,9.9,14.4,11.3
. n = 10, x = 10.260000000000002, S = 2.51360741211157 t-interval
sample 2: 10.2,6.9,10.9,11,10.1,5.3,7.5,10.3,9.2,8.8
. n = 10, x = 9.02, S = 1.8966637375489976 t-interval
sample combined: 12.9,10.2,7.4,7,10.5,11.9,7.1,9.9,14.4,11.3,10.2,6.9,10.9,11,10.1,5.3,7.5,10.3,9.2,8.8
. n = 20, x = 9.640000000000002, S = 2.258644213728786 t-interval
Pooled sample variance 4.957777777777779 != 5.101473684210526 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: 2.700000000000001,3.299999999999999,-3.5,-4,0.40000000000000036,6.6000000000000005,-0.40000000000000036,-0.40000000000000036,5.200000000000001,2.5
. n = 10, x = 1.2400000000000002, S = 3.4702545535834495 t-interval - This example computes a paired difference interval 0.1987±2.1448(0.2383/√15)=(0.0668,0.3306) according to the formula ¯d±t0.025,14(sd/√(n)) The difference is significant if it excludes 0.
sample 1: 1.94,1.44,1.56,1.58,2.06,1.66,1.75,1.77,1.78,1.92,1.25,1.93,2.04,1.62,2.08
. n = 15, x = 1.7586666666666668, S = 0.24242426406926312 t-interval
sample 2: 1.27,1.63,1.47,1.39,1.93,1.26,1.71,1.67,1.28,1.85,1.02,1.34,2.02,1.59,1.97
. n = 15, x = 1.5599999999999998, S = 0.30125926186117974 t-interval
sample combined: 1.94,1.44,1.56,1.58,2.06,1.66,1.75,1.77,1.78,1.92,1.25,1.93,2.04,1.62,2.08,1.27,1.63,1.47,1.39,1.93,1.26,1.71,1.67,1.28,1.85,1.02,1.34,2.02,1.59,1.97
. n = 30, x = 1.6593333333333338, S = 0.2870411881214278 t-interval
Pooled sample variance 0.07476333333333333 != 0.08239264367816092 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: 0.6699999999999999,-0.18999999999999995,0.09000000000000008,0.19000000000000017,0.13000000000000012,0.3999999999999999,0.040000000000000036,0.10000000000000009,0.5,0.06999999999999984,0.22999999999999998,0.5899999999999999,0.020000000000000018,0.030000000000000027,0.1100000000000001
. n = 15, x = 0.19866666666666669, S = 0.23829353647090287 t-interval - Futures without Await are slower
sample 1: 696,707,738,702,680,684,683,765,700,688
. n = 10, x = 704.3, S = 27.166359916468586 t-interval
sample 2: 664,634,725,653,644,557,667,638,751,654
. n = 10, x = 658.7, S = 52.3493606031206 t-interval
sample combined: 696,707,738,702,680,684,683,765,700,688,664,634,725,653,644,557,667,638,751,654
. n = 20, x = 681.5, S = 46.84970370068636 t-interval
Pooled sample variance 1739.2333333333331 != 2194.8947368421054 of combined sample variance
t-interval for the distance between unpaired smaples with (same) pooled variance and different variances
sample diff: 32,73,13,49,36,127,16,127,-51,34
. n = 10, x = 45.6, S = 53.43365564469229 t-interval
sample combined:
. n = 0, x = NaN, S = 0 t-interval
No comments:
Post a Comment