top of page
  • Black Facebook Icon
  • Black Twitter Icon
  • Black Instagram Icon

Example 1e. Demonstrating CI and P-value Congruency

Demonstrating CI and p-value congruency. Compute [LCL(alphaL), UCL(alphaU)]. What is p-value for H0: WMWprob ≤ LCL(alphaL) vs. H1: WMWprob > LCL(alphaL)?  p = alphaL. Likewise, what is p-value for H0: WMWprob ≤ UCL(0.alphaU) vs. H1: WMWprob > UCL(0.alphaU)? p = 1 - alphaU.

The duality between frequentist hypothesis testing (p-values) and confidence intervals should be well understood by anyone who uses them.

As per Example 1d, consider the two-sided 95% CI [LCL(0.045), UCL(0.005)].

LCL and P-value Congruency

What is the p-value for testing H0: WMWprob ≤ LCL(0.045) vs. H1: WMWprob > LCL(0.045)? Answer:p = 0.045.

The first WMW() run prints nothing (Print=F), but creates Ex1e.1. a list with 13 components, including $CI.WMWprob. $CI.WMWprob[1] = LCL(0.045) and $CI.WMWprob[2] = UCL(0.001) The second WMW() run tests H0: WMWprob ≤ LCL(0.045) vs. WMWprob > LCL(0.045). The computed p-value must be 0.045.

    Ex1e.1 <- WMW(Y=Rating, Group=TrueDiseaseStatus,

                  GroupLevels=c("Abnormal","Normal"),

                  Alpha=c(0.045, 0.005), Print=F)

 

    names(Ex1e.1)

    print(Ex1e.1$CI.WMWprob)
 
    Ex1e.2 <- WMW(Y=Rating, Group=TrueDiseaseStatus,
                  GroupLevels=c("Abnormal", "Normal"),

                  Alpha=c(0.045, 0.005),
                  WMWprob0=Ex1e.1$CI.WMWprob[1])

>     names(Ex1e.1)
 [1] "WMWprob"    "SE.WMWprob" "Alphas"     "CI.level"   "CI.WMWprob" "WMWodds"   
 [7] "CI.WMWodds" "WMWprob0"   "WMWodds0"   "pvalue"     "pvalue2"    "Qscores"   


>     print(Ex1e.1$CI.WMWprob)
[1] 0.8297968 0.9493515

*******************************************************************
Parameter  Estimate      0.95 CI*      One-Sided Hypothesis   P**    
*******************************************************************
 WMWprob     0.893    [0.830, 0.949]   H0: WMWprob <= 0.83  0.0450  
 WMWodds     8.361    [4.875, 18.744]  H0: WMWodds <= 4.88  0.0450  
*******************************************************************
*CI error rates (alphaL, alphaU): (0.0450, 0.0050)
 CI Method: coupling Sen (1967) & Mee (1990)
**Normal(0, 1) test statistic, Z = 1.70
  P-value for H0: WMWprob >= 0.83:  1 - 0.0450 = 0.9550
  Two-sided p-value (H0: WMWprob = 0.83): 0.0900

UCL and P-value Congruency

What must the p-value be for H0: WMWprob ≤ UCL(0.005) vs. WMWprob > UCL(0.005)? p = 1 - 0.005 = 0.995.

     Ex1e.3 <- WMW(Y=Rating, Group=TrueDiseaseStatus,
                  GroupLevels=c("Abnormal", "Normal"),

                  Alpha=c(0.045, 0.005),
                  WMWprob0=Ex1e.1$CI.WMWprob[2])

******************************************************************
Parameter  Estimate      0.95 CI*      One-Sided Hypothesis   P**   
..................................................................
 WMWprob     0.893    [0.830, 0.949]   H0: WMWprob <= 0.95  0.995  
 WMWodds     8.361    [4.875, 18.744]  H0: WMWodds <= 18.7  0.995  
******************************************************************
*CI error rates (alphaL, alphaU): (0.0450, 0.0050)
 CI Method: coupling Sen (1967) & Mee (1990)
**Normal(0, 1) test statistic, Z = -2.58
  P-value for H0: WMWprob >= 0.95:  1 - 0.995 = 0.005
  Two-sided p-value (H0: WMWprob = 0.95): 0.010

bottom of page