Jonckheere-Terpstra Trend Test Calculator

Enter ranked samples across ordered groups here. See JT statistics, tie correction, approximations, and exports. Compare directional patterns across independent samples with clear summaries.

Calculator Input

Use one group name per line. The order defines the hypothesized trend.
Use one group per line. Separate values with commas, spaces, semicolons, or vertical bars.
Reset

About This Test

The Jonckheere-Terpstra test is a nonparametric method for detecting ordered trends across independent groups. It is useful when group order matters and data may not follow a normal distribution. The test checks whether later groups tend to contain larger or smaller values than earlier groups.

This calculator accepts raw values, keeps the entered group order, applies tie-aware pair counting, computes the asymptotic normal approximation, and provides exportable summaries for reporting and review.

Example Data Table

Order Group Example Values Median
1 Low Exposure 12, 14, 15, 16, 18 15
2 Moderate Exposure 17, 19, 21, 22, 24 21
3 High Exposure 23, 25, 27, 28, 30 27

This sample usually produces a strong increasing trend because later groups consistently contain larger values.

Formula Used

For each earlier group i and later group j, every observation in group i is compared with every observation in group j.

The increasing-direction statistic is:

J = Σ Uij

Its null expectation is:

E(J) = (N² − Σng²) / 4

The no-tie variance is:

Var(J) = [N²(2N + 3) − Σng²(2ng + 3)] / 72

This calculator also applies the pooled tie correction:

Vartie(J) uses pooled tie block sizes and group sizes to adjust the asymptotic variance before standardization.

The standardized test statistic is:

z = (J − E(J) − c) / √Vartie(J)

Here c is the continuity correction when enabled. The reported p value comes from the normal approximation.

How to Use This Calculator

  1. Enter one ordered group name on each line.
  2. Enter each group’s numeric values on matching lines.
  3. Keep the group order consistent with the expected trend.
  4. Select increasing, decreasing, or two-sided testing.
  5. Choose alpha, continuity correction, and decimal places.
  6. Press calculate to show the result above the form.
  7. Review group summaries, pair contributions, and the graph.
  8. Use CSV or PDF export for reporting.

FAQs

1. What does this test evaluate?

It evaluates whether values tend to rise or fall across independent groups that already have a meaningful order.

2. When should I use it?

Use it when group order matters, the samples are independent, and you want a rank-based trend test instead of a mean-based parametric method.

3. Can the groups have different sizes?

Yes. The Jonckheere-Terpstra test supports unequal group sizes, which makes it practical for real datasets.

4. How are ties handled here?

Tied comparisons add half a point to each direction, and the variance is adjusted using a pooled tie correction.

5. Does this page return an exact p value?

No. This implementation reports the asymptotic normal approximation, which is standard for moderate and larger samples.

6. What does the centered effect show?

It summarizes directional dominance on a scale from negative to positive, helping you judge whether the ordered trend leans downward or upward.

7. Why can medians rise but the result stay non-significant?

Small sample sizes, many ties, and overlapping values can weaken evidence even when group summaries look ordered.

8. What input format works best?

Use one group per line and separate values with commas or spaces. Avoid text labels inside the value lines.

Related Calculators

Mann-Whitney U Test CalculatorKruskal-Wallis H Test CalculatorKendall Tau Correlation CalculatorChi-Square Goodness of Fit CalculatorSign Test CalculatorKolmogorov-Smirnov One Sample Test CalculatorKolmogorov-Smirnov Two Sample Test CalculatorMcNemar Test CalculatorFisher Exact Test CalculatorBinomial Sign Test Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.