由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 问个binomial variance的公式
相关主题
sample distribution的理解发个狗家QA面经,已跪
Google面试问题A question about estimator
问学统计的同学一个关于P-value的弱问题怎么分辨 standard error 和 standard deviation?
log-likelihood菜鸟问个算样本量的问题
请教: Var(Xi-X-bar) 等于Var(Xi) 吗?sign vs signed rank
sample size 的问题问个关于variance的问题!
last baozi help !!!!! How can I find sigma( VARIANCE) for log(RR)help:question regarding confidence intervals
Linear RegressionA question about basic statistics, thanks.
相关话题的讨论汇总
话题: hat话题: variance话题: sample话题: var话题: phat
进入Statistics版参与讨论
1 (共1页)
d********h
发帖数: 2048
1
一直认为,p的variance是p×(1-p)/n;现在发现我们单位的公式是用p×(1-p)/(n
-1);据说是harvard的一帮人帮我们搞的。有这种公式吗?极度怀疑中。
k*******a
发帖数: 772
2
这个上sampling课的时候用得是这个
其实就是 sample variance 类似于 S^2, 因为你的p用得是估算的p而不是真实的p
w*******e
发帖数: 182
3
你的p是population p,他们的p是sampling p,degree of freedom 不一样

(n

【在 d********h 的大作中提到】
: 一直认为,p的variance是p×(1-p)/n;现在发现我们单位的公式是用p×(1-p)/(n
: -1);据说是harvard的一帮人帮我们搞的。有这种公式吗?极度怀疑中。

d********h
发帖数: 2048
4
对于normal distr的sample variance 你也可以用公式推导出unbiased 用n-1,但对于
binomial,我从来没见过用n-1的,网上也没搜到过,到时normal时用n-1搜到很多。你
确认sampling是binomial的吗?

【在 k*******a 的大作中提到】
: 这个上sampling课的时候用得是这个
: 其实就是 sample variance 类似于 S^2, 因为你的p用得是估算的p而不是真实的p

t******g
发帖数: 372
5
var(p) = var(x/n) = var(x)/n^2 = np(1-p)/n^2 = p(1-p)/n
想不出这个n-1是怎么出来的,也看不出推的哪里有问题

【在 d********h 的大作中提到】
: 对于normal distr的sample variance 你也可以用公式推导出unbiased 用n-1,但对于
: binomial,我从来没见过用n-1的,网上也没搜到过,到时normal时用n-1搜到很多。你
: 确认sampling是binomial的吗?

Z****B
发帖数: 195
6
Finite 和 infinite 的区别,找本sampling看看。
d********h
发帖数: 2048
7
查了一下,correction factor应该是(N-n)/(N-1),但也不是(n-1)啊
h***i
发帖数: 3844
8
var(p_hat) = var(x_bar) = var(x)/n = p(1-p)/n
E(p_hat*(1-p_hat))=E(p_hat)-E(p_hat^2)
= p-var(p_hat)-p^2
= p-p(1-p)/n-p^2
= p-p/n+p^2/n-p^2
= [(n-1)/n]p-[(n-1)/n] p^2
= [(n-1)/n] [p-p^2]
so, hat(var(p_hat))= p_hat*(1-p_hat)*(n/n-1)/n
= p_hat*(1-p_hat)/(n-1)


【在 t******g 的大作中提到】
: var(p) = var(x/n) = var(x)/n^2 = np(1-p)/n^2 = p(1-p)/n
: 想不出这个n-1是怎么出来的,也看不出推的哪里有问题

d********h
发帖数: 2048
9
根据variance 公式 p×(1-p)/n, 因为N的缘故,population variance往往会远小
于sample variance。如果要correction的话,factor应该是小于1的,而现在用n-1只
会使sample variance偏离population variance更大。
h***i
发帖数: 3844
10
E(p_hat*(1-p_hat))=(n-1)/n p(1-p);
so, you are wrong in this statement,population variance往往会远小于sample
variance!
sample variance:
E(p_hat*(1-p_hat)/n) < p(1-p)/n (variance of phat)
so, we need to adjust the bias.

【在 d********h 的大作中提到】
: 根据variance 公式 p×(1-p)/n, 因为N的缘故,population variance往往会远小
: 于sample variance。如果要correction的话,factor应该是小于1的,而现在用n-1只
: 会使sample variance偏离population variance更大。

相关主题
sample size 的问题发个狗家QA面经,已跪
last baozi help !!!!! How can I find sigma( VARIANCE) for log(RR)A question about estimator
Linear Regression怎么分辨 standard error 和 standard deviation?
进入Statistics版参与讨论
d********h
发帖数: 2048
11
1)population variance 是根据P*(1-P)/N;
sample variance是根据p×(1-P)/n; 一般N>>n的,所以我说population的variance
要远小于sample variance的;
2)假设n~N,p*(1-p)/n 是很有可能小于 p_hat*(1-p_hat)/n 的,这时候,再加个
correction factor ,sample variance更是大于 true variance;
3)在你的推理中,var(p_hat)=p(1-p)/n,我认为var(p_hat)=p_hat*(1-p_hat)/n.
另外,在normal distribution中,因为sample mean替代true mean,少一个df的原因
,sample variance是永远小于true variance的,所以要correct;但对于目前
binomial 的公式,sample variance是可能大于population variance的。

【在 h***i 的大作中提到】
: E(p_hat*(1-p_hat))=(n-1)/n p(1-p);
: so, you are wrong in this statement,population variance往往会远小于sample
: variance!
: sample variance:
: E(p_hat*(1-p_hat)/n) < p(1-p)/n (variance of phat)
: so, we need to adjust the bias.

h***i
发帖数: 3844
12
hehe
1: var(p_hat)=p_hat*(1-p_hat)/n.
你再三思一下吧
2: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原
因,sample variance是永远小于true variance的,所以要correct;
你这句sample variance 永远小于population variance,我就很好奇,是学统计的说
出来的么?

variance

【在 d********h 的大作中提到】
: 1)population variance 是根据P*(1-P)/N;
: sample variance是根据p×(1-P)/n; 一般N>>n的,所以我说population的variance
: 要远小于sample variance的;
: 2)假设n~N,p*(1-p)/n 是很有可能小于 p_hat*(1-p_hat)/n 的,这时候,再加个
: correction factor ,sample variance更是大于 true variance;
: 3)在你的推理中,var(p_hat)=p(1-p)/n,我认为var(p_hat)=p_hat*(1-p_hat)/n.
: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原因
: ,sample variance是永远小于true variance的,所以要correct;但对于目前
: binomial 的公式,sample variance是可能大于population variance的。

d********h
发帖数: 2048
13
我想说的是
Because the sample mean usually differs from the population mean, the
variance and standard deviation that we calculate using the sample mean will
always be smaller than it would have been had we used the population mean.
Therefore, when we use the sample mean to generate an estimate of the
population variance or standard deviation, we will actually underestimate
the size of the true variance in the population To adjust for this
underestimation, we use n - 1 in the denominator of our sample formulas。
你可以看一下下列网站中的sample variance公式,他也提到If(x_bar-x_true)^2 > 0
(which it almost certainly will be), then the sample variance will be
smaller than the population variance.
http://www.ualberta.ca/~sbarreda/stats/samplevar/samplevar.html
对于binomial,如果我们用类似的the mean squared difference from the mean公式
,也会得到n-1的adjust;
但用p*(1-p)/n来模拟variance,你是得不到这个结论的。
suppose sample mean =0.5, the true mean may be 0.495 or 0.505;
in those cases, sample variance is larger than variance based on p*(1-p)
. How could you correct the bias using (n-1) which will make the sample
variance
even larger?

【在 h***i 的大作中提到】
: hehe
: 1: var(p_hat)=p_hat*(1-p_hat)/n.
: 你再三思一下吧
: 2: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原
: 因,sample variance是永远小于true variance的,所以要correct;
: 你这句sample variance 永远小于population variance,我就很好奇,是学统计的说
: 出来的么?
:
: variance

h***i
发帖数: 3844
14
Because the sample mean usually differs from the population mean, the
variance and standard deviation that we calculate using the sample mean will
always be smaller than it would have been had we used the population mean.
这个结论你是要说
phat(1-phat)/n < p(1-p)/n ?
其实吧,phat就是另外一个大于0小于1的number,等价于,你要去证明
given p1, p2, p1 !=p2, prove,
p1(1-p1)/n < p2(1-p2)/n, "always be" means with probability 1?
I think, it is wrong, correct? ,当然这个结论只有 在P2=0.5的时候成立,不过原
贴没见你说P2=0。5, 而且你还真举了P2=0。5的例子,和和,你为何不举p2=
0。3来算算

will
.
0

【在 d********h 的大作中提到】
: 我想说的是
: Because the sample mean usually differs from the population mean, the
: variance and standard deviation that we calculate using the sample mean will
: always be smaller than it would have been had we used the population mean.
: Therefore, when we use the sample mean to generate an estimate of the
: population variance or standard deviation, we will actually underestimate
: the size of the true variance in the population To adjust for this
: underestimation, we use n - 1 in the denominator of our sample formulas。
: 你可以看一下下列网站中的sample variance公式,他也提到If(x_bar-x_true)^2 > 0
: (which it almost certainly will be), then the sample variance will be

d********h
发帖数: 2048
15
我想我们说的不是一个东西,
我说的sample variance is always smaller than population variance,公式是指
sum(Xi-X_bar)^2 always 相反,对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
可能小,这种情况下,correction是不准确的。

will

【在 h***i 的大作中提到】
: Because the sample mean usually differs from the population mean, the
: variance and standard deviation that we calculate using the sample mean will
: always be smaller than it would have been had we used the population mean.
: 这个结论你是要说
: phat(1-phat)/n < p(1-p)/n ?
: 其实吧,phat就是另外一个大于0小于1的number,等价于,你要去证明
: given p1, p2, p1 !=p2, prove,
: p1(1-p1)/n < p2(1-p2)/n, "always be" means with probability 1?
: I think, it is wrong, correct? ,当然这个结论只有 在P2=0.5的时候成立,不过原
: 贴没见你说P2=0。5, 而且你还真举了P2=0。5的例子,和和,你为何不举p2=

h***i
发帖数: 3844
16
对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
可能小,这种情况下,correction是不准确的。
建议你复习复习unbiased estimator,用N-1就是要得到一个unbiased estimator of
var of phat而已。这你还有啥疑问?而且,你那句,var of phat= phat(1-phat
)/n,你忘记左边加hat了.

【在 d********h 的大作中提到】
: 我想我们说的不是一个东西,
: 我说的sample variance is always smaller than population variance,公式是指
: sum(Xi-X_bar)^2 always : 相反,对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
: 可能小,这种情况下,correction是不准确的。
:
: will

d********h
发帖数: 2048
17
谢谢你的耐心解释,不过还是有点不明白,unbiased 是希望sample variance更接近
true variance
假设100个patient,true p=0.7,sample p=0.6
true variance=0.7×(1-0.7)/100=0.0021;
sample variance=0.6×(1-0.6)/100=0.0024;
after correction:0.6*(1-0.6)/99=0.00242,variance更大了。
当然如果true p在0.5-0.6 之间的话,correction更有意义
对于normaldistribution,模拟了很多次,correction 确实是更靠近true variance

of
phat

【在 h***i 的大作中提到】
: 对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
: 可能小,这种情况下,correction是不准确的。
: 建议你复习复习unbiased estimator,用N-1就是要得到一个unbiased estimator of
: var of phat而已。这你还有啥疑问?而且,你那句,var of phat= phat(1-phat
: )/n,你忘记左边加hat了.

h***i
发帖数: 3844
18
unbiased estimator of variance,
say, you have a variance estimator of var(phat), name it has, hat(var(phat))
so, unbiased estimator means:
E(hat(var(phat)))=var(phat)
你的example是一个样本而已.如果你再不明白,就找本统计基础教材翻翻吧。

【在 d********h 的大作中提到】
: 谢谢你的耐心解释,不过还是有点不明白,unbiased 是希望sample variance更接近
: true variance
: 假设100个patient,true p=0.7,sample p=0.6
: true variance=0.7×(1-0.7)/100=0.0021;
: sample variance=0.6×(1-0.6)/100=0.0024;
: after correction:0.6*(1-0.6)/99=0.00242,variance更大了。
: 当然如果true p在0.5-0.6 之间的话,correction更有意义
: 对于normaldistribution,模拟了很多次,correction 确实是更靠近true variance
:
: of

d********h
发帖数: 2048
19
举个例子,假设我们想知道这个城市的男女比例,我们抽取了1000个人,我们就用这一
千个人的sample mean 代替population mean, sample variance估算population
variance。不就是用一个p吗?照你这么说,这只是一个样本,我们要重复抽取多次多
个1000(或是其他数目),那岂不是beta binomial吗?
我感觉这已经是多样本了,只不过是0,1的多样本,sample size 是1000。

))

【在 h***i 的大作中提到】
: unbiased estimator of variance,
: say, you have a variance estimator of var(phat), name it has, hat(var(phat))
: so, unbiased estimator means:
: E(hat(var(phat)))=var(phat)
: 你的example是一个样本而已.如果你再不明白,就找本统计基础教材翻翻吧。

h***i
发帖数: 3844
20
这只是一个样本,我们要重复抽取多次多个1000
你总算明白了,真不容易。要得到phat的分布,这是一种方法。
我这里不讨论bayes,不用往里面加prior.

【在 d********h 的大作中提到】
: 举个例子,假设我们想知道这个城市的男女比例,我们抽取了1000个人,我们就用这一
: 千个人的sample mean 代替population mean, sample variance估算population
: variance。不就是用一个p吗?照你这么说,这只是一个样本,我们要重复抽取多次多
: 个1000(或是其他数目),那岂不是beta binomial吗?
: 我感觉这已经是多样本了,只不过是0,1的多样本,sample size 是1000。
:
: ))

相关主题
菜鸟问个算样本量的问题help:question regarding confidence intervals
sign vs signed rankA question about basic statistics, thanks.
问个关于variance的问题!学术一个:不完全数据的统计怎么做?
进入Statistics版参与讨论
d********h
发帖数: 2048
21
你说的是另一种分布,p1,p2,...pn, 每一个都是binomial,这时,variable是p(p1,p2,
..);现在
我们只关注p1,variable是x(0,1,0..)。
p1是基于1000个Bernoulli分布,根据这1000个sample size,我们是足以得到p1_hat,
p1的variance是根据p1_hat*(1-p1_hat)来估算的,也就是说对于p1的variance,它是
类似于单样本的一个p1_hat.如果是continuous normal的话,p1是基于1000个值的,(
x1-p1)^2+....
另外的问题就是当p1_hat=0.5时,corrected variance超出了p1的最大范围。
我的看法是,p*(1-p)/(n-1)做为correction是有问题的,这也是为什么你很难看到
unbiased binomial estimator的说法,在讨论binomial的,更多的提法是sample
proportion是unbiased,而不提variance。

【在 h***i 的大作中提到】
: 这只是一个样本,我们要重复抽取多次多个1000
: 你总算明白了,真不容易。要得到phat的分布,这是一种方法。
: 我这里不讨论bayes,不用往里面加prior.

h***i
发帖数: 3844
22
我们在讨论估计phat的方差说了这么半天,你告诉我phat(1-phat)/n的期望是多
少吧。 算了,不和你讨论了,和和

p2,

【在 d********h 的大作中提到】
: 你说的是另一种分布,p1,p2,...pn, 每一个都是binomial,这时,variable是p(p1,p2,
: ..);现在
: 我们只关注p1,variable是x(0,1,0..)。
: p1是基于1000个Bernoulli分布,根据这1000个sample size,我们是足以得到p1_hat,
: p1的variance是根据p1_hat*(1-p1_hat)来估算的,也就是说对于p1的variance,它是
: 类似于单样本的一个p1_hat.如果是continuous normal的话,p1是基于1000个值的,(
: x1-p1)^2+....
: 另外的问题就是当p1_hat=0.5时,corrected variance超出了p1的最大范围。
: 我的看法是,p*(1-p)/(n-1)做为correction是有问题的,这也是为什么你很难看到
: unbiased binomial estimator的说法,在讨论binomial的,更多的提法是sample

d********h
发帖数: 2048
23
一直认为,p的variance是p×(1-p)/n;现在发现我们单位的公式是用p×(1-p)/(n
-1);据说是harvard的一帮人帮我们搞的。有这种公式吗?极度怀疑中。
k*******a
发帖数: 772
24
这个上sampling课的时候用得是这个
其实就是 sample variance 类似于 S^2, 因为你的p用得是估算的p而不是真实的p
w*******e
发帖数: 182
25
你的p是population p,他们的p是sampling p,degree of freedom 不一样

(n

【在 d********h 的大作中提到】
: 一直认为,p的variance是p×(1-p)/n;现在发现我们单位的公式是用p×(1-p)/(n
: -1);据说是harvard的一帮人帮我们搞的。有这种公式吗?极度怀疑中。

d********h
发帖数: 2048
26
对于normal distr的sample variance 你也可以用公式推导出unbiased 用n-1,但对于
binomial,我从来没见过用n-1的,网上也没搜到过,到时normal时用n-1搜到很多。你
确认sampling是binomial的吗?

【在 k*******a 的大作中提到】
: 这个上sampling课的时候用得是这个
: 其实就是 sample variance 类似于 S^2, 因为你的p用得是估算的p而不是真实的p

t******g
发帖数: 372
27
var(p_hat) = var(x_bar/n) = var(x_bar)/n^2
= var(x)/n^3 = p(1-p)n^2/(n-1) / n^3 = p(1-p)/n(n-1)
之前想的不对,现在推的自己也不确定对不对了

【在 d********h 的大作中提到】
: 对于normal distr的sample variance 你也可以用公式推导出unbiased 用n-1,但对于
: binomial,我从来没见过用n-1的,网上也没搜到过,到时normal时用n-1搜到很多。你
: 确认sampling是binomial的吗?

Z****B
发帖数: 195
28
Finite 和 infinite 的区别,找本sampling看看。
d********h
发帖数: 2048
29
查了一下,correction factor应该是(N-n)/(N-1),但也不是(n-1)啊
h***i
发帖数: 3844
30
var(p_hat) = var(x_bar) = var(x)/n = p(1-p)/n
E(p_hat*(1-p_hat))=E(p_hat)-E(p_hat^2)
= p-var(p_hat)-p^2
= p-p(1-p)/n-p^2
= p-p/n+p^2/n-p^2
= [(n-1)/n]p-[(n-1)/n] p^2
= [(n-1)/n] [p-p^2]
so, hat(var(p_hat))= p_hat*(1-p_hat)*(n/n-1)/n
= p_hat*(1-p_hat)/(n-1)


【在 t******g 的大作中提到】
: var(p_hat) = var(x_bar/n) = var(x_bar)/n^2
: = var(x)/n^3 = p(1-p)n^2/(n-1) / n^3 = p(1-p)/n(n-1)
: 之前想的不对,现在推的自己也不确定对不对了

相关主题
急求各位大牛关于一个project的clue(8.24.2013)Google面试问题
请教一个bootstrapping的问题。问学统计的同学一个关于P-value的弱问题
sample distribution的理解log-likelihood
进入Statistics版参与讨论
d********h
发帖数: 2048
31
根据variance 公式 p×(1-p)/n, 因为N的缘故,population variance往往会远小
于sample variance。如果要correction的话,factor应该是小于1的,而现在用n-1只
会使sample variance偏离population variance更大。
h***i
发帖数: 3844
32
E(p_hat*(1-p_hat))=(n-1)/n p(1-p);
so, you are wrong in this statement,population variance往往会远小于sample
variance!
sample variance:
E(p_hat*(1-p_hat)/n) < p(1-p)/n (variance of phat)
so, we need to adjust the bias.

【在 d********h 的大作中提到】
: 根据variance 公式 p×(1-p)/n, 因为N的缘故,population variance往往会远小
: 于sample variance。如果要correction的话,factor应该是小于1的,而现在用n-1只
: 会使sample variance偏离population variance更大。

d********h
发帖数: 2048
33
1)population variance 是根据P*(1-P)/N;
sample variance是根据p×(1-P)/n; 一般N>>n的,所以我说population的variance
要远小于sample variance的;
2)假设n~N,p*(1-p)/n 是很有可能小于 p_hat*(1-p_hat)/n 的,这时候,再加个
correction factor ,sample variance更是大于 true variance;
3)在你的推理中,var(p_hat)=p(1-p)/n,我认为var(p_hat)=p_hat*(1-p_hat)/n.
另外,在normal distribution中,因为sample mean替代true mean,少一个df的原因
,sample variance是永远小于true variance的,所以要correct;但对于目前
binomial 的公式,sample variance是可能大于population variance的。

【在 h***i 的大作中提到】
: E(p_hat*(1-p_hat))=(n-1)/n p(1-p);
: so, you are wrong in this statement,population variance往往会远小于sample
: variance!
: sample variance:
: E(p_hat*(1-p_hat)/n) < p(1-p)/n (variance of phat)
: so, we need to adjust the bias.

h***i
发帖数: 3844
34
hehe
1: var(p_hat)=p_hat*(1-p_hat)/n.
你再三思一下吧
2: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原
因,sample variance是永远小于true variance的,所以要correct;
你这句sample variance 永远小于population variance,我就很好奇,是学统计的说
出来的么?

variance

【在 d********h 的大作中提到】
: 1)population variance 是根据P*(1-P)/N;
: sample variance是根据p×(1-P)/n; 一般N>>n的,所以我说population的variance
: 要远小于sample variance的;
: 2)假设n~N,p*(1-p)/n 是很有可能小于 p_hat*(1-p_hat)/n 的,这时候,再加个
: correction factor ,sample variance更是大于 true variance;
: 3)在你的推理中,var(p_hat)=p(1-p)/n,我认为var(p_hat)=p_hat*(1-p_hat)/n.
: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原因
: ,sample variance是永远小于true variance的,所以要correct;但对于目前
: binomial 的公式,sample variance是可能大于population variance的。

d********h
发帖数: 2048
35
我想说的是
Because the sample mean usually differs from the population mean, the
variance and standard deviation that we calculate using the sample mean will
always be smaller than it would have been had we used the population mean.
Therefore, when we use the sample mean to generate an estimate of the
population variance or standard deviation, we will actually underestimate
the size of the true variance in the population To adjust for this
underestimation, we use n - 1 in the denominator of our sample formulas。
你可以看一下下列网站中的sample variance公式,他也提到If(x_bar-x_true)^2 > 0
(which it almost certainly will be), then the sample variance will be
smaller than the population variance.
http://www.ualberta.ca/~sbarreda/stats/samplevar/samplevar.html
对于binomial,如果我们用类似的the mean squared difference from the mean公式
,也会得到n-1的adjust;
但用p*(1-p)/n来模拟variance,你是得不到这个结论的。
suppose sample mean =0.5, the true mean may be 0.495 or 0.505;
in those cases, sample variance is larger than variance based on p*(1-p)
. How could you correct the bias using (n-1) which will make the sample
variance
even larger?

【在 h***i 的大作中提到】
: hehe
: 1: var(p_hat)=p_hat*(1-p_hat)/n.
: 你再三思一下吧
: 2: 另外,在normal distribution中,因为sample mean替代true mean,少一个df的原
: 因,sample variance是永远小于true variance的,所以要correct;
: 你这句sample variance 永远小于population variance,我就很好奇,是学统计的说
: 出来的么?
:
: variance

h***i
发帖数: 3844
36
Because the sample mean usually differs from the population mean, the
variance and standard deviation that we calculate using the sample mean will
always be smaller than it would have been had we used the population mean.
这个结论你是要说
phat(1-phat)/n < p(1-p)/n ?
其实吧,phat就是另外一个大于0小于1的number,等价于,你要去证明
given p1, p2, p1 !=p2, prove,
p1(1-p1)/n < p2(1-p2)/n, "always be" means with probability 1?
I think, it is wrong, correct? ,当然这个结论只有 在P2=0.5的时候成立,不过原
贴没见你说P2=0。5, 而且你还真举了P2=0。5的例子,和和,你为何不举p2=
0。3来算算

will
.
0

【在 d********h 的大作中提到】
: 我想说的是
: Because the sample mean usually differs from the population mean, the
: variance and standard deviation that we calculate using the sample mean will
: always be smaller than it would have been had we used the population mean.
: Therefore, when we use the sample mean to generate an estimate of the
: population variance or standard deviation, we will actually underestimate
: the size of the true variance in the population To adjust for this
: underestimation, we use n - 1 in the denominator of our sample formulas。
: 你可以看一下下列网站中的sample variance公式,他也提到If(x_bar-x_true)^2 > 0
: (which it almost certainly will be), then the sample variance will be

d********h
发帖数: 2048
37
我想我们说的不是一个东西,
我说的sample variance is always smaller than population variance,公式是指
sum(Xi-X_bar)^2 always 相反,对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
可能小,这种情况下,correction是不准确的。

will

【在 h***i 的大作中提到】
: Because the sample mean usually differs from the population mean, the
: variance and standard deviation that we calculate using the sample mean will
: always be smaller than it would have been had we used the population mean.
: 这个结论你是要说
: phat(1-phat)/n < p(1-p)/n ?
: 其实吧,phat就是另外一个大于0小于1的number,等价于,你要去证明
: given p1, p2, p1 !=p2, prove,
: p1(1-p1)/n < p2(1-p2)/n, "always be" means with probability 1?
: I think, it is wrong, correct? ,当然这个结论只有 在P2=0.5的时候成立,不过原
: 贴没见你说P2=0。5, 而且你还真举了P2=0。5的例子,和和,你为何不举p2=

h***i
发帖数: 3844
38
对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
可能小,这种情况下,correction是不准确的。
建议你复习复习unbiased estimator,用N-1就是要得到一个unbiased estimator of
var of phat而已。这你还有啥疑问?而且,你那句,var of phat= phat(1-phat
)/n,你忘记左边加hat了.

【在 d********h 的大作中提到】
: 我想我们说的不是一个东西,
: 我说的sample variance is always smaller than population variance,公式是指
: sum(Xi-X_bar)^2 always : 相反,对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
: 可能小,这种情况下,correction是不准确的。
:
: will

d********h
发帖数: 2048
39
谢谢你的耐心解释,不过还是有点不明白,unbiased 是希望sample variance更接近
true variance
假设100个patient,true p=0.7,sample p=0.6
true variance=0.7×(1-0.7)/100=0.0021;
sample variance=0.6×(1-0.6)/100=0.0024;
after correction:0.6*(1-0.6)/99=0.00242,variance更大了。
当然如果true p在0.5-0.6 之间的话,correction更有意义
对于normaldistribution,模拟了很多次,correction 确实是更靠近true variance

of
phat

【在 h***i 的大作中提到】
: 对于公式 phat(1-phat)/n ,它与 p(1-p)/n 之间的关系是不确定的,可能大也
: 可能小,这种情况下,correction是不准确的。
: 建议你复习复习unbiased estimator,用N-1就是要得到一个unbiased estimator of
: var of phat而已。这你还有啥疑问?而且,你那句,var of phat= phat(1-phat
: )/n,你忘记左边加hat了.

h***i
发帖数: 3844
40
unbiased estimator of variance,
say, you have a variance estimator of var(phat), name it has, hat(var(phat))
so, unbiased estimator means:
E(hat(var(phat)))=var(phat)
你的example是一个样本而已.如果你再不明白,就找本统计基础教材翻翻吧。

【在 d********h 的大作中提到】
: 谢谢你的耐心解释,不过还是有点不明白,unbiased 是希望sample variance更接近
: true variance
: 假设100个patient,true p=0.7,sample p=0.6
: true variance=0.7×(1-0.7)/100=0.0021;
: sample variance=0.6×(1-0.6)/100=0.0024;
: after correction:0.6*(1-0.6)/99=0.00242,variance更大了。
: 当然如果true p在0.5-0.6 之间的话,correction更有意义
: 对于normaldistribution,模拟了很多次,correction 确实是更靠近true variance
:
: of

相关主题
log-likelihoodlast baozi help !!!!! How can I find sigma( VARIANCE) for log(RR)
请教: Var(Xi-X-bar) 等于Var(Xi) 吗?Linear Regression
sample size 的问题发个狗家QA面经,已跪
进入Statistics版参与讨论
d********h
发帖数: 2048
41
举个例子,假设我们想知道这个城市的男女比例,我们抽取了1000个人,我们就用这一
千个人的sample mean 代替population mean, sample variance估算population
variance。不就是用一个p吗?照你这么说,这只是一个样本,我们要重复抽取多次多
个1000(或是其他数目),那岂不是beta binomial吗?
我感觉这已经是多样本了,只不过是0,1的多样本,sample size 是1000。

))

【在 h***i 的大作中提到】
: unbiased estimator of variance,
: say, you have a variance estimator of var(phat), name it has, hat(var(phat))
: so, unbiased estimator means:
: E(hat(var(phat)))=var(phat)
: 你的example是一个样本而已.如果你再不明白,就找本统计基础教材翻翻吧。

h***i
发帖数: 3844
42
这只是一个样本,我们要重复抽取多次多个1000
你总算明白了,真不容易。要得到phat的分布,这是一种方法。
我这里不讨论bayes,不用往里面加prior.

【在 d********h 的大作中提到】
: 举个例子,假设我们想知道这个城市的男女比例,我们抽取了1000个人,我们就用这一
: 千个人的sample mean 代替population mean, sample variance估算population
: variance。不就是用一个p吗?照你这么说,这只是一个样本,我们要重复抽取多次多
: 个1000(或是其他数目),那岂不是beta binomial吗?
: 我感觉这已经是多样本了,只不过是0,1的多样本,sample size 是1000。
:
: ))

d********h
发帖数: 2048
43
你说的是另一种分布,p1,p2,...pn, 每一个都是binomial,这时,variable是p(p1,p2,
..);现在
我们只关注p1,variable是x(0,1,0..)。
p1是基于1000个Bernoulli分布,根据这1000个sample size,我们是足以得到p1_hat,
p1的variance是根据p1_hat*(1-p1_hat)来估算的,也就是说对于p1的variance,它是
类似于单样本的一个p1_hat.如果是continuous normal的话,p1是基于1000个值的,(
x1-p1)^2+....
另外的问题就是当p1_hat=0.5时,corrected variance超出了p1的最大范围。
我的看法是,p*(1-p)/(n-1)做为correction是有问题的,这也是为什么你很难看到
unbiased binomial estimator的说法,在讨论binomial的,更多的提法是sample
proportion是unbiased,而不提variance。

【在 h***i 的大作中提到】
: 这只是一个样本,我们要重复抽取多次多个1000
: 你总算明白了,真不容易。要得到phat的分布,这是一种方法。
: 我这里不讨论bayes,不用往里面加prior.

h***i
发帖数: 3844
44
我们在讨论估计phat的方差说了这么半天,你告诉我phat(1-phat)/n的期望是多
少吧。 算了,不和你讨论了,和和

p2,

【在 d********h 的大作中提到】
: 你说的是另一种分布,p1,p2,...pn, 每一个都是binomial,这时,variable是p(p1,p2,
: ..);现在
: 我们只关注p1,variable是x(0,1,0..)。
: p1是基于1000个Bernoulli分布,根据这1000个sample size,我们是足以得到p1_hat,
: p1的variance是根据p1_hat*(1-p1_hat)来估算的,也就是说对于p1的variance,它是
: 类似于单样本的一个p1_hat.如果是continuous normal的话,p1是基于1000个值的,(
: x1-p1)^2+....
: 另外的问题就是当p1_hat=0.5时,corrected variance超出了p1的最大范围。
: 我的看法是,p*(1-p)/(n-1)做为correction是有问题的,这也是为什么你很难看到
: unbiased binomial estimator的说法,在讨论binomial的,更多的提法是sample

d********h
发帖数: 2048
45
那在实际计算中,你会用n-1来调整吗?因为在现实中,一般不会取很多次样本,而是
所谓的单样本。而这个单样本的phat*(1-phat)与真实的p*(1-p)的关系是不定的。

【在 h***i 的大作中提到】
: 我们在讨论估计phat的方差说了这么半天,你告诉我phat(1-phat)/n的期望是多
: 少吧。 算了,不和你讨论了,和和
:
: p2,

h***i
发帖数: 3844
46
我们讨论的是为什么你看到有人用了n-1,我告诉你,用n-1是因为人想用unbiased
estimator of variance,所以我只是解答了你的疑问"那个n-1是怎么来的"。至
于有没有必要那是另外一回事情。对我来说,如果sample size比较大,n和n-1没什
么区别,我不care 是n还是n-1,没有你说的什么correct之类的问题。
sample size比较小,可以用exact confidence interval。

【在 d********h 的大作中提到】
: 那在实际计算中,你会用n-1来调整吗?因为在现实中,一般不会取很多次样本,而是
: 所谓的单样本。而这个单样本的phat*(1-phat)与真实的p*(1-p)的关系是不定的。

1 (共1页)
进入Statistics版参与讨论
相关主题
A question about basic statistics, thanks.请教: Var(Xi-X-bar) 等于Var(Xi) 吗?
学术一个:不完全数据的统计怎么做?sample size 的问题
急求各位大牛关于一个project的clue(8.24.2013)last baozi help !!!!! How can I find sigma( VARIANCE) for log(RR)
请教一个bootstrapping的问题。Linear Regression
sample distribution的理解发个狗家QA面经,已跪
Google面试问题A question about estimator
问学统计的同学一个关于P-value的弱问题怎么分辨 standard error 和 standard deviation?
log-likelihood菜鸟问个算样本量的问题
相关话题的讨论汇总
话题: hat话题: variance话题: sample话题: var话题: phat