精华内容
下载资源
问答
  • 单侧检验与双侧检验的区别

    千次阅读 2020-12-23 13:54:35
    单侧检验,在对另一侧的效果不做检测的情况下,拥有更多的权重来检测一侧的效果。下面就来讨论在什么情况下适合采用单侧检验的方法。 When is a one-tailed test appropriate? 在什么情况下适合采用单侧检验的方法 ...

    What are the

    differences

    between one-tailed and two-tailed

    tests?

    来源:

    Institute for Digital Research

    and Education

    When you conduct a test of statistical significance, whether it

    is from a correlation, an ANOVA, a regression or some other kind of

    test, you are given a p-value somewhere in the

    output. If your test statistic is symmetrically

    distributed, you can select one of three alternative hypotheses.

    Two of these correspond to one-tailed tests and one corresponds to

    a two-tailed test. However, the p-value presented

    is (almost always) for a two-tailed test. But how

    do you choose which test? Is the p-value

    appropriate for your test? And, if it is not, how can you calculate

    the correct p-value for your test given the p-value in your

    output?

    就相关性、方差、回归等方面做统计学显著性检验,在结果中总会给出p值。倘若检定统计量(test

    statistic)为均匀分布,那么就可以在三个替代假设(alternative

    hypotheses)中选择一个。其中,有两个跟单侧检验(one-tailed test)对应,一个跟双侧检验(two-tailed

    test)对应。不过,无论如何,p值(总是)采用的是双侧检验。但是如何来选择检验方法呢?p值是否与其般配呢?如果不合适,如何来正确地计算p值呢?

    What is a two-tailed test?

    什么是双侧检验?

    First let’s start with the meaning of a two-tailed test.

    If you are using a significance level of 0.05, a

    two-tailed test allots half of your alpha to testing the

    statistical significance in one direction and half of your alpha to

    testing statistical significance in the other

    direction. This means that .025 is in each tail

    of the distribution of your test statistic. When using a two-tailed

    test, regardless of the direction of the relationship you

    hypothesize, you are testing for the possibility of the

    relationship in both directions. For example, we

    may wish to compare the mean of a sample to a given value x

    using a t-test. Our null hypothesis is that the

    mean is equal to x. A two-tailed test will test both if the

    mean is significantly greater than x and if the mean

    significantly less than x. The mean is considered

    significantly different from x if the test statistic is in

    the top 2.5% or bottom 2.5% of its probability distribution,

    resulting in a p-value less than

    0.05.

    首先来看双侧检验的定义。如果显著性水平为0.05,双侧检验将检测统计显著性的alpha的一半置于一侧,另外一半置于另一侧,即,一侧的检定量分布为0.025,另一侧的也是0.025。采用双侧检验的时候,无论假设的关系的方向如何,对关系的可能性都要要进行双侧检验。例如,当希望将某一样本的均值来跟一个给定的值

    x 做比较的时候,初始假设(null hypothesis)为均值等于 x 。接下来是一个双侧检验,看均值是否明显大于 x

    还是明显小于 x 。如果检定统计量位于概率分布的右侧的2.5%或者概率分布的左侧的2.5%,导致 p 值小于0.05的话,则认为均值与

    x 有明显的区别。

    概率正态分布

    What is a one-tailed test?

    什么是单侧检验?

    Next, let’s discuss the meaning of a one-tailed

    test. If you are using a significance level of

    .05, a one-tailed test allots all of your alpha to testing the

    statistical significance in the one direction of

    interest. This means that .05 is in one tail of

    the distribution of your test statistic. When using a one-tailed

    test, you are testing for the possibility of the relationship in

    one direction and completely disregarding the possibility of a

    relationship in the other direction. Let’s return

    to our example comparing the mean of a sample to a given value

    x using a t-test. Our null hypothesis is

    that the mean is equal to x. A one-tailed test will test

    either if the mean is significantly greater than x or if the

    mean is significantly less than x, but not both. Then,

    depending on the chosen tail, the mean is significantly greater

    than or less than x if the test statistic is in the top 5%

    of its probability distribution or bottom 5% of its probability

    distribution, resulting in a p-value less than

    0.05. The one-tailed test provides more power to

    detect an effect in one direction by not testing the effect in the

    other direction. A discussion of when this is an appropriate option

    follows.

    接下来讨论单侧检验的定义。如果显著性水平采用0.05,单侧检验将检验统计显著性的alpha完全放在相关的一侧,即,将0.05放在检验统计量分布的一侧。采用单侧检验的时候,考虑的只是一侧的关系概率,而对另一侧的则视之不见。退回到上例,采用

    t 检验对均值跟一个给定的 x 值做比较,原始假设为均值等于 x 。单侧检验只检验均值是否明显大于 x 或者明显小于 x

    ,不会同时检验两者。那么,根据所选择的一侧,如果检测统计量落在其概率分布的右侧的5%内或者左侧的5%内,均值明显大于或者小于 x

    将得出一个小于0.05的 p

    值。单侧检验,在对另一侧的效果不做检测的情况下,拥有更多的权重来检测一侧的效果。下面就来讨论在什么情况下适合采用单侧检验的方法。

    When is a one-tailed test appropriate?

    在什么情况下适合采用单侧检验的方法

    Because the one-tailed test provides more power to detect an

    effect, you may be tempted to use a one-tailed test whenever you

    have a hypothesis about the direction of an effect. Before doing

    so, consider the consequences of missing an effect in the other

    direction. Imagine you have developed a new drug

    that you believe is an improvement over an existing

    drug. You wish to maximize your ability to detect

    the improvement, so you opt for a one-tailed test. In doing so, you

    fail to test for the possibility that the new drug is less

    effective than the existing drug. The

    consequences in this example are extreme, but they illustrate a

    danger of inappropriate use of a one-tailed test.

    单侧检验具有更多的权限(power)来检测效果,只要手头有一个关于某一效果的方向的假设,实验者就想将它放在优先的位置来考虑。不过,在正式采用之前,必须斟酌因丢失另一个方向的效果而产生的各种后果。设想实验者开发了一种新药,并认为它相对于目前存在的某种药物有改善。他想最大化检测这种改善的能力,于是采用了单侧检验。这么一来,他没能对新药的效果是否不如现存的那种药物的效果进行检测。这不过是一个极端的例子,但是它揭示了采用单侧检验不当的危险。

    So when is a one-tailed test appropriate? If you consider the

    consequences of missing an effect in the untested direction and

    conclude that they are negligible and in no way irresponsible or

    unethical, then you can proceed with a one-tailed test. For

    example, imagine again that you have developed a new drug. It is

    cheaper than the existing drug and, you believe, no less

    effective. In testing this drug, you are only

    interested in testing if it less effective than the existing

    drug. You do not care if it is significantly more

    effective. You only wish to show that it is not

    less effective. In this scenario, a one-tailed test would be

    appropriate.

    那么什么时候采用单侧检验才合适呢?在对未检验一侧丢失的效果所产生的各种后果都做了考虑,并且认定它们可以忽略不计,绝对不是不负责任或者不道德的表现之后,才能实施单侧检验。例如,再次设想实验者开发来一种新药。它比现存的某种药物要便宜,并且实验者相信它绝对不会比现存的那种药物的效果要差。在检验这个药物的过程中,实验者仅仅对它是否比现存的药物的效果要差感兴趣。他对这种药物是否比现存的这种药物的效果明显要好不感兴趣。他只是希望它的效果不低于现有的药物。在这种情况下,采用单侧检验是合适的。

    When is a one-tailed test NOT appropriate?

    什么时候单侧检验不合适呢?

    Choosing a one-tailed test for the sole purpose of attaining

    significance is not appropriate. Choosing a

    one-tailed test after running a two-tailed test that failed to

    reject the null hypothesis is not appropriate, no matter how

    "close" to significant the two-tailed test was. Using statistical tests inappropriately can lead to invalid results

    that are not replicable and highly questionable–a steep price to

    pay for a significance star in your results

    table!

    Deriving a one-tailed test from two-tailed output

    从单侧检验派生出双侧检验

    The default among statistical packages performing tests is to

    report two-tailed p-values. Because the most

    commonly used test statistic distributions (standard normal,

    Student’s t) are symmetric about zero, most one-tailed p-values can

    be derived from the two-tailed

    p-values.

    Below, we have the output from a two-sample t-test in

    Stata. The test is comparing the mean male score

    to the mean female score. The null hypothesis is

    that the difference in means is zero. The

    two-sided alternative is that the difference in means is not

    zero. There are two one-sided alternatives that

    one could opt to test instead: that the male score is higher than

    the female score (diff > 0) or that the female

    score is higher than the male score (diff <

    0). In this instance, Stata presents results for

    all three alternatives. Under the headings Ha:

    diff < 0 and Ha: diff > 0 are the results for the

    one-tailed tests. In the middle, under the heading Ha: diff !=

    0 (which means that the difference is not equal to 0), are the

    results for the two-tailed test.

    Note that the test statistic, -3.7341, is the same for all of

    these tests. The two-tailed p-value is P >

    |t|. This can be rewritten as P(>3.7341) + P(<

    -3.7341). Because the t-distribution is symmetric

    about zero, these two probabilities are equal: P > |t| = 2

    * P(< -3.7341). Thus, we can

    see that the two-tailed p-value is twice the one-tailed p-value for

    the alternative hypothesis that (diff < 0). The other one-tailed alternative hypothesis has a p-value of

    P(>-3.7341) = 1-(P

    0.9999. So, depending on the

    direction of the one-tailed hypothesis, its p-value is either

    0.5*(two-tailed p-value) or 1-0.5*(two-tailed p-value) if the test

    statistic symmetrically distributed about zero.

    注意,检测统计量,-3.7341,对所有的检测来说都是相同的。双侧的 p 值为 P > |t|。这可以重新写做 P

    (>3.7341)+ P ( |t| =

    2 * P(< -3.7341)。因此,对应于替代假设 (diff <

    0),可以将双侧检验的 p 值看成是单侧检验的 p 值的两倍。另一侧的单侧替代假设的 P (>-2.7341)的 p 值 =

    1-(P

    0.9999。所以,根据单侧假设的方向,如果检测统计量是关于零的对称分布的话,它的 p 值要不是 0.5 * (双侧 p 值),就是 1-0.5 * (双侧 p 值)。

    In this example, the two-tailed p-value suggests rejecting the

    null hypothesis of no difference. Had we opted for the one-tailed

    test of (diff > 0), we would fail to reject the null because of

    our choice of tails.

    在这个例子中,双侧 p 值建议对无差异的原始假设(零假设)不予考虑。但是,倘若实验者采用了(diff >

    0)的单侧检验的话,他可能因为他所做的选择而不能排斥该原始假设。

    The output below is from a regression analysis in

    Stata. Unlike the example above, only the

    two-sided p-values are presented in this output.

    下面是采用统计软件 Stata 做的回归分析的结果。跟上面的例子不一样,该结果中只有双侧的 p 值。

    For each regression coefficient, the tested null hypothesis is that

    the coefficient is equal to zero. Thus, the

    one-tailed alternatives are that the coefficient is greater than

    zero and that the coefficient is less than zero. To get the p-value

    for the one-tailed test of the variable science having a

    coefficient greater than zero, you would divide the .008 by 2,

    yielding .004 because the effect is going in the predicted

    direction. This is P(>2.67). If you had made your prediction in

    the other direction (the opposite direction of the model effect),

    the p-value would have been 1 – .004 = .996. This

    is P(<2.67). For all three p-values, the test statistic is

    2.67.

    回归系数在原始假设里都等于零。因此,所有的单侧替代假设都将其系数设为大于零和小于零。为了取得系数大于零的变量“科学(science)”的单侧检验的

    p 值,必须将 0.008 除以 2,得0.004,因为该效果会落在预计的方向。这是 P

    (>2.67)。如果实验者在这之前将预测放在方向的另一侧(与本模型效果相反的方向),p 值就会是 1 –0.004 =

    0.996。这是 P (<2.67)。对所有三个 p 值,检验统计量都是 2.67。

    展开全文
  • python t检验 单侧检验

    2020-10-14 17:47:15
    scipy库中stats提供了双侧检验,如果需要单侧检验需要做一下处理 def ttest_onesided(s): from spicy.stats import ttest_1samp (t, p) = ttest_1samp(s, 0) if t > 0: onesided_p = 1 - p / 2 else: ...

    scipy库中stats提供了双侧检验,如果需要单侧检验需要做一下处理

    def ttest_onesided(s):
        from spicy.stats import ttest_1samp
        (t, p) = ttest_1samp(s, 0)
        if t > 0:
            onesided_p = 1 - p / 2
        else:
            onesided_p = p / 2
        return onesided_p
        ```
    
    展开全文
  • 单侧检验和双侧检验都是属于现代医学上比较常见的一种检验的方法,通过单侧检验或者是双侧检验可以有效检查出药物数据以及专业知识等,而单侧检验和双侧检验也是存在一定的区别的,需要根据专业的检验结果来进行判断...

    单侧检验和双侧检验都是属于现代医学上比较常见的一种检验的方法,通过单侧检验或者是双侧检验可以有效检查出药物数据以及专业知识等,而单侧检验和双侧检验也是存在一定的区别的,需要根据专业的检验结果来进行判断。

    8b1bb8d07426e2ff23ff5424a55f09ca.png

    单侧检验和双侧检验的区别是什么?

    应考虑所要解决问题的目的,根据专业知识来确定用单侧检验还是双侧检验。若从专业知识判断一种方法的结果不可能低于或高于另一种方法的结果时,可用单侧检验;尚不能从专业知识判断两种结果谁高谁低时,则用双侧检验。

    例如:药物治疗之前和治疗之后的数据做t检验,如果从专业知识可以判断治疗后数据不可能低于(或高于)治疗前数据,可以选择单侧t检验。如果目前专业知识无法判断治疗前后结果谁高谁低时,要用双侧t检验。

    98fc3b98ea380a8a749dd3d4df21ed51.png

    相同的t值, 双侧的P值要比单侧的P值高;如下图所示:自由度df=10时,t=1.812, 双侧P=0.1,单侧P=0.05。单侧检验如果误认为是双侧检验,就不易拒绝H0;双侧检验如果误用单侧检验,就比较易拒绝H0。

    从专业知识判断, 如果不清楚后测数据是否高于前测数据,研究目的是想判断前后测的均值是否不同,就需要用双侧检验。如果从专业知识判断, 如果后测数据不可能低于前测数据,研究目的是仅仅想知道后测数据是不是高于前测数据,则可以采用单侧检验。

    f60881274cd2fe638fba9553c874f9a3.png

    相同的t值, 双侧的P值要比单侧的P值高。相同的P值, 双侧的t值要比单侧的t值高。单侧检验如果误认为是双侧检验,就不易拒绝H0;双侧检验如果误用单侧检验,就比较易拒绝H0。

    展开全文
  • 应考虑所要解决问题的目的,根据专业知识来确定用单侧检验还是双侧检验。若从专业知识判断一种方法的结果不可能低于或高于另一种方法的结果时,可用单侧检验;尚不能从专业知识判断两种结果谁高谁低时,则用双侧检验...

    应考虑所要解决问题的目的,根据专业知识来确定用单侧检验还是双侧检验。若从专业知识判断一种方法的结果不可能低于或高于另一种方法的结果时,可用单侧检验;尚不能从专业知识判断两种结果谁高谁低时,则用双侧检验。

    例如:药物治疗之前和治疗之后的数据做t检验,如果从专业知识可以判断治疗后数据不可能低于(或高于)治疗前数据,可以选择单侧t检验。如果目前专业知识无法判断治疗前后结果谁高谁低时,要用双侧t检验。

    相同的t值, 双侧的P值要比单侧的P值高;如下图所示:自由度df=10时,t=1.812, 双侧P=0.1,单侧P=0.05。单侧检验如果误认为是双侧检验,就不易拒绝H0;双侧检验如果误用单侧检验,就比较易拒绝H0。

    扩展资料:

    从专业知识判断, 如果不清楚后测数据是否高于前测数据,研究目的是想判断前后测的均值是否不同,就需要用双侧检验。如果从专业知识判断, 如果后测数据不可能低于前测数据,研究目的是仅仅想知道后测数据是不是高于前测数据,则可以采用单侧检验。

    相同的t值, 双侧的P值要比单侧的P值高。相同的P值, 双侧的t值要比单侧的t值高。单侧检验如果误认为是双侧检验,就不易拒绝H0;双侧检验如果误用单侧检验,就比较易拒绝H0。

    参考资料:

    百度百科——t检验

    百度百科——单侧检验

    百度百科——双侧检验

    展开全文
  • 单侧检验和双侧检验

    千次阅读 2019-02-02 22:13:22
    根据是否强调检验的方向性,将检验分为单侧检验和双侧检验。双侧检验只关心两个总体参数之间是否有差异,而不关心谁大谁小。如引子中,研究者关心的是F中高三重点班学生和高三学生总体的平均智商是否有差异,而不是...
  • 转载于:回归方程的显著性检验(F检验)是单侧还是双侧检验,为什么?
  • 假设检验与单侧检验、双侧检验

    万次阅读 2019-02-28 19:35:49
    在看假设检验的例题的时候发现,同样是5%的显著性水平,有时候会选择使用双侧检验,有时候又选择单侧,到底应该如何选择?
  • 单侧检验和双侧检验单侧检验和双侧检验医学统计学及其软件包 上海第二医科大学 生物统计教研室 第一节 医学统计学 第一节 医学统计学 1.统计学 (statistics):收集,整理和分析带有随机性的数据。 2.医学统计学 ...
  • 下图红字部分
  • [SPSS]如何利用spss进行单侧检验

    千次阅读 2017-09-02 21:34:00
    根据网上经验来看,结论如下: 单双侧t检验,t值不变,p值除以2即为单侧p值。 转载于:https://www.cnblogs.com/susuye/p/7467972.html
  • “如要检验学生平均每月的饮料消费额是否大于等于60元,每户居民平均固定电话费是否小于等于100元等,此类问题的检验均为单侧检验。” 解答: 另外, 第一次使用ZTEST函数,比较新鲜,补充...
  • 例:神经学家测试一种药物对反应时间的效果,分别对100只老鼠注射一单位剂量的药物,对其进行神经刺激,然后记录反应时间,已知没有注射药物的老鼠的平均反应时间是1.2秒,100只注射了药物的老鼠的平均反应时间是...
  • 在编程的时候,不少语言或者编程包只有现成的双侧T检验的函数,我想知道怎么根据双侧T检验的p值来得到单侧T检验的p值。 或者更广一点来说,单侧T检验p值与双侧T检验的p值是什么关系? 双侧T检验 零假设H0:μ=0H0:μ=...
  • 经过一番研究,确定应该是教材中的T函数类型用错了(有可能是旧版本Excel函数的bug),出现了检验方法与实例解答不一致。本文已修复这个错误(红色框部分)。 在实际应用中,要注意临界值即尾型(单、双;左、右)...
  • t检验计算公式 - 百度文库
  • 假设检验(单侧).ppt

    2021-04-24 10:47:28
    假设检验(单侧).ppt总体废品率的 假设检验(双侧) H0成立时 取N(0,1)的1-?/2分位数u1-?/2 假设检验(单侧) 问题 H0成立,乙方应接受那批产品. 问:如果将?提高,会有什么结果? 总体分布的正态性检验 正态分布的偏度g1...
  • 对正态总体参数的单侧假设检验,可以用以下方法进行。设显著水平为α\alphaα,对假设H0H_0H0​的右侧检验,首先,注意到检验统计量的分布对应显著水平α\alphaα的右分位点bbb,实际上就是其残存函数S(x)S(x)S(x)...
  • 带你搞明白单侧双侧T检验

    万次阅读 2018-09-30 16:59:14
    双侧T检验 零假设H0: μ=0,对立假设Ha: μ≠0(p value可以通俗的理解为同时满足tscore和对立假设的概率,所以越小越支持原假设)  ...单侧T检验 零假设H0:μ=0,对立假设Ha:μ&gt;0 如...
  • 假设检验单侧还是双侧

    千次阅读 2020-01-27 18:24:21
    H 0 : a = a 0 , H ...单侧检验:若根据理论知识或实践经验判断甲处理的效果不会比乙处理的效果差/好,分析的目的在于判断甲处理比乙处理好/差 一般情况下,如不做特殊说明均指双侧检验
  • 对正态总体的方差σ2≤σ02\sigma^2\leq\sigma_0^2σ2≤σ02​(或σ2≥σ02\sigma^2\geq\sigma_0^2σ2≥σ02​)进行显著水平α\alphaα下的假设检验检验统计量n−1σ02S2\frac{n-1}{\sigma_0^2}S^2σ02​n−1​...
  • 【数理统计】均值检验(双侧、单侧)和区间估计

    千次阅读 多人点赞 2021-11-29 10:47:55
    在统计推断中有两类问题,一类为估计问题,一类为假设检验。估计问题中主要包括**点估计**和**区间估计**,点估计是估计出一个分布中**未知参数的值**,**区间估计则是估计出一个分布中未知参数所在的范围**。 区间...
  • 设总体XXX~N(μ1,σ12)N(\mu_1,\sigma_1^2)N(μ1​,σ12​),YYY~N(μ2,σ22)N(\mu_2, \sigma_2^2)N(μ2​,σ22​)相互独立,为检验右侧假设H0:σ12/σ22≤1,H1:σ12/σ22>1H_0:\sigma_1^2/\sigma_2^2\leq1,H_1:\...
  • 单侧置信区间

    千次阅读 2019-05-26 09:49:29
  • 设XXX和YYY相互独立且XXX~N(μ1,σ12)N(\mu_1,\sigma_1^2)N(μ1​,σ12​),YYY~N(μ2,σ22)N(\mu_2,\sigma_2^2)N(μ2​,σ22​),其中σ12\sigma_1^2...对显著水平α\alphaα,检验假设H0:μ1−μ2≥δH_0:\mu_1-\mu_2
  • 单侧置信区间推导单边假设检验

    万次阅读 2015-11-11 11:41:47
    置信区间,假设检验,统计学
  • 检验右侧假设H0:μ1−μ2≤δ,H1:μ1−μ2>δH_0:\mu_1-\mu_2\leq\delta,H_1:\mu_1-\mu_2>\deltaH0​:μ1​−μ2​≤δ,H1​:μ1​−μ2​>δ(或左侧假设H0:μ1−μ2≥δ,H1:μ1−μ2<δH_0:\mu_1-\...
  • 确定原假设和备择假设(单侧检验和双侧检验) 根据需要检测的量构造一个分布 绘制标准正态分布的概率密度图 设置一个置信水平β(相信原假设成立的概率),一般为90%、95%、99% 正态分布的基本知识: 形状: 正态...
  • 假设检验

    2020-10-20 10:42:52
    我们为什么要假设检验 我们在生活中经常会遇到对一个总体数据进行评估的问题,但我们又不能直接统计全部数据,这时就需要从总体中抽出一部分样本,用样本来估计总体情况。 举一个简单的例子: 学而思网校App进行...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,939
精华内容 775
关键字:

单侧检验

友情链接: progenvb6.zip