Skip to contents

Mann-Whitney U Test with Plain-English Interpretation

Usage

mannwhitney_interpret(
  x,
  y,
  conf.level = 0.95,
  var_name = "Variable",
  context = NULL
)

Arguments

x

A numeric vector (group 1)

y

A numeric vector (group 2)

conf.level

Confidence level. Default 0.95.

var_name

Optional label for the report. Default "Variable"

context

Optional description of the study design or sampling method, echoed back in the printed report. Default NULL.

Value

An object of class statease_mannwhitney containing test results and interpretation. Use print() to display the formatted report.

Examples

x <- c(23, 45, 12, 67, 34, 89, 56)
y <- c(19, 38, 22, 51, 29, 74, 44)
result <- mannwhitney_interpret(x, y)
#> Warning: Sample size is small (n < 10). Interpret results with caution.
print(result)
#> 
#> -- statease Mann-Whitney U Test Report --------------------------
#>   Variable     : Variable
#>   Group 1      : n = 7  |  Median = 45.00
#>   Group 2      : n = 7  |  Median = 38.00
#> -----------------------------------------------------------------
#>   W statistic  : 29.000
#>   p-value      : 0.6200
#>   95% CI      : [-21.000, 38.000]
#>   Effect size  : 0.133 (small)
#> -----------------------------------------------------------------
#>   Assumption Checks:
#>     Sample size (Group 1)   : NOTE     (n = 7)
#>     Sample size (Group 2)   : NOTE     (n = 7)
#>     Test method used        : NOTE     (Wilcoxon rank sum exact test)
#>     Independence            : NOTE     (assumed from study design, not testable from data)
#> 
#>   NOTE: These are contextual notes rather than pass/fail checks.
#>   They describe aspects of the data and test method relevant to
#>   interpretation, but are not automatically verifiable by the
#>   package.
#> -----------------------------------------------------------------
#>   Interpretation:
#>   The result is not statistically significant (p = 0.6200 > alpha 0.05).
#>   Values in Group 1 appear stochastically greater than values in Group 2. (Reported medians: Group 1 = 45.00, Group 2 = 38.00)
#>   Effect size is small (r = 0.133).
#>   Note: Mann-Whitney tests stochastic superiority,
#>   not differences in medians.
#> -----------------------------------------------------------------
#>