Gnumeric · Statistical analysis · Intermediate
Test a Hypothesized Median with Gnumeric's Sign Test
Run Gnumeric's one-sample Sign Test, count ties correctly, and interpret its binomial probabilities without confusing it with Wilcoxon.
Gnumeric 1.12.62 manual and released source reviewed; ordinary formulas checked by headless ssconvert; graphical Sign Test execution pending · Editorial standards
Use Gnumeric’s one-sample Sign Test to compare a sample with a hypothesized population median. It counts observations above and below the specified value; it does not test the arithmetic mean or rank the sizes of the differences.
The practical traps are ties to the hypothesized median, the meaning of the tool’s one-tailed row, and a 1.12.62 two-tailed calculation that can exceed 1 when sign counts are balanced. The example below shows how to check all three.
Version and verification: These instructions are qualified to Gnumeric 1.12.62’s English GTK interface, using the released manual, menu, dialog and calculation source. Ordinary worksheet formulas were recalculated by headless ssconvert on Debian 13 x86-64 and compared with exact independent arithmetic. The graphical Sign Test dialog and its analysis-tool execution were not run. No screenshot or cross-platform GUI verification is claimed.
Choose the question before the test
For this exercise, the null hypothesis is population median = 10. Use a two-sided alternative, population median â 10, and choose α = 0.05 before examining the result.
The binomial calculation assumes independent observations whose non-tied signs are equally likely to be positive or negative under the null. A continuous population with median 10 has equal probability on either side of 10 and does not require a symmetric distribution. However, when recorded values have ties, interpreting the tie-deleted test also requires the equal-sign assumption for the remaining observations. A discrete scale or substantial rounding can require more careful statistical treatment; merely deleting ties does not establish that assumption.
This is not the Wilcoxon Signed Rank Test. Although both choices appear in the same dialog, the sign test uses counts, not signed ranks. This guide does not cover Wilcoxon’s assumptions, rank ties or approximation. It also does not cover the paired two-sample Sign Test.
Enter an eleven-observation example
Put the following original practice data in A1:A12, with one observation per row:
| Cell | Reading |
|---|---|
| A1 | Reading |
| A2 | 8 |
| A3 | 10 |
| A4 | 12 |
| A5 | 12 |
| A6 | 13 |
| A7 | 14 |
| A8 | 15 |
| A9 | 16 |
| A10 | 17 |
| A11 | 18 |
| A12 | 19 |
Compare every reading with 10, not with the sample median:
- Below 10: 1 observation, the 8.
- Above 10: 9 observations. Both readings of 12 count; repeated non-tied values are not discarded.
- Equal to 10: 1 observation, omitted from the sign counts.
- Effective N: 1 + 9 = 10, not the eleven numeric observations in the sheet.
- Test Statistic: min(1,9) = 1.
- Sample Median: 14, calculated from the full numeric sample, including the observation equal to 10.
A âzeroâ here means a zero difference from the predicted median. If the predicted median is 10, a literal reading of 0 is below it and counts as negative. If the predicted median is 0, a reading of 0 is a tie. The released sign-test calculation uses strict less-than and greater-than comparisons and counts N with a not-equal comparison.
Configure the one-sample dialog
- Choose Statistics â One Sample Tests â Claims About a Median â Sign TestâŠ. Do not choose the similarly named item under Two Sample Tests. The released menu hierarchy and English labels establish this path.
- In the Testing 1 Median dialog, on Input, set Input range to
A1:A12. A sheet-qualified reference added by the range selector is normal. - Choose Grouped by: Columns, then select Labels because A1 contains the heading. If you select only
A2:A12, leave Labels off; otherwise the first real observation would be removed as a label. - On Test, confirm Sign Test, not Wilcoxon Signed Rank Test.
- Set Predicted Median to 10. This is the hypothesized population value, not the observed median of 14. The dialog initially supplies 0, so do not leave the default accidentally.
- Set Alpha to 0.05, not 5. The released dialog requires a value strictly between 0 and 1.
- On Output, choose New sheet to avoid overwriting the input. Choose FormulĂŠ if you want results to update when existing input cells change; Values produces a snapshot. Neither option automatically extends the fixed input range when you append more rows.
- Select OK, then compare the output with the expected values below.
These controls are defined in the released sign-test dialog, dialog handler, and shared output controls.
The dialog also offers Rows and Areas grouping. Each group is tested separately, not pooled into one sample. For this lesson, keep the single-column arrangement so that one output column represents the eleven readings.
Read the expected result
This is an explanatory reconstruction from source and independent calculations, not captured analysis-tool output.
| Sign Test | Reading |
|---|---|
| Median | 14 |
| Predicted Median | 10 |
| Test Statistic | 1 |
| N | 10 |
| α | 0.05 |
| P(Tâ€t) one-tailed | 0.0107421875 |
| P(Tâ€t) two-tailed | 0.021484375 |
The released engine calculates the first probability as BINOMDIST(t,N,0.5,TRUE()), where t is the smaller observed sign count. It obtains the second row by doubling the first. Those labels are the tool’s labels; the underlying cumulative distribution is binomial, not a separate fitted distribution of the sample median.
For the prespecified two-sided question, 0.021484375 < 0.05, so this practice result rejects the null under the stated model. It does not establish the size or practical importance of a difference, nor is the p-value the probability that the null hypothesis is true.
Alpha is a decision threshold, not an input that changes these binomial probabilities. The source writes α into the result but does not use it in either probability formula. At α = 0.01, the same two-sided p-value would not reject; that would not prove the median equals 10.
Derive the probability independently
With ten independent non-tied signs, the equal-sign null gives 2Âčâ° = 1,024 equally likely sign arrangements. A specified side receiving at most one sign has:
- One arrangement with zero signs on that side.
- Ten arrangements with exactly one sign on that side.
Thus its inclusive lower-tail probability is (1 + 10) / 1,024 = 11/1,024 = 0.0107421875. The opposite extreme is equally likely and disjoint in this example, so the two-sided probability is 22/1,024 = 0.021484375. No normal approximation is needed.
On the original data sheet, ordinary formulas provide a second check:
| Formula | Expected result |
|---|---|
=COUNTIF(A2:A12,"<10") |
1 |
=COUNTIF(A2:A12,">10") |
9 |
=COUNTIF(A2:A12,"=10") |
1 |
=MEDIAN(A2:A12) |
14 |
=BINOMDIST(1,10,0.5,TRUE()) |
0.0107421875 |
=2*BINOMDIST(1,10,0.5,TRUE()) |
0.021484375 |
Use cumulative TRUE(). FALSE() gives only the probability of exactly one sign, excluding the more extreme zero-sign outcome. These COUNTIF checks are for the complete numeric example, not a claim that COUNTIF reproduces the analysis tool’s handling of mixed text, blanks or errors. See the BINOMDIST guide for the function’s arguments.
Do not choose a direction after seeing the small tail
The dialog has no greater-than/less-than alternative selector. Its one-tailed row uses the smaller count whichever direction the data favor. That small number is not automatically the p-value for a directional hypothesis you specified earlier.
For the example’s nine observations above 10:
- If the alternative was median > 10, the relevant upper tail of the positive count is P(B â„ 9) = 11/1,024, agreeing with the tool’s small-tail row.
- If the alternative was median < 10, the relevant lower tail is P(B †9) = 1,023/1,024 = 0.9990234375, obtainable with
=BINOMDIST(9,10,0.5,TRUE()). The data do not support that direction.
Because the binomial distribution is discrete and both tails include the observed value, the second probability is not simply 1 minus the first. If the question is âdifferent,â use the two-sided calculation rather than choosing whichever direction looks significant.
Important 1.12.62 balanced-count boundary
For five readings below and five above the hypothesized median, t = 5 and N = 10. The cumulative binomial value is 638/1,024 = 0.623046875. The released tool’s unbounded doubling formula therefore gives 1.24609375.
A p-value cannot exceed 1. The two tails overlap at the center; the two-sided probability for this completely balanced outcome is 1. For nonempty valid sign data, an independent equal-tail check is =MIN(1,2*BINOMDIST(t,N,0.5,TRUE())), replacing t and N with the relevant cells or numbers. For the balanced example, =MIN(1,2*BINOMDIST(5,10,0.5,TRUE())) returns 1.
This is a source-confirmed missing cap, with its arithmetic reproduced by ordinary formulas. It is not a claim that the graphical tool was executed. Preserve the original output if you encounter it, document the corrected independent probability, and do not silently report a value above 1 as a valid p-value.
Troubleshooting and stopping conditions
| Symptom | What to check |
|---|---|
| N is 10 although there are eleven readings | The reading equal to the predicted median is excluded from N. Reconcile below + above + tied counts with the numeric sample size. |
| The statistic or N is wrong | Check the exact range, Columns grouping, Labels setting and predicted median. Changing the hypothesis value changes which observations are ties. |
| Repeated readings disappeared during preparation | Do not deduplicate legitimate observations. The two 12s are two positive signs; this is not a tied-rank calculation. |
| The small one-tailed value seems to support the wrong direction | It is based on the smaller sign count. Calculate the tail for the direction chosen before looking at the data. |
| The two-tailed value exceeds 1 | Check for balanced signs and the missing-cap boundary above. It is not a probability greater than certainty. |
| Every reading equals the predicted median | N is zero: there are no non-tied signs to analyze. Stop and report that limitation, not a significant result or proof of equality. This guide does not certify the tool’s displayed all-tie result or error behavior. |
| Empty, text-filled or error-containing input gives confusing output | Inspect and clean the source on a copy; establish which observations belong in the analysis. The source has numeric guards for sign counts, but mixed-data and error propagation are not validated here. Do not replace missing observations with invented zeros. |
| OK is disabled | Check that the input range parses, Predicted Median is numeric, 0 < Alpha < 1, and the output destination is valid. These are the checks in the released dialog handler. |
| Results stay unchanged after editing data | Check whether output was Values or the edit lies outside the fixed selected range. Rerun with the intended range and FormulĂŠ if recalculation is needed. |
Related guidance and evidence
- MEDIAN in Gnumeric explains the descriptive sample median; calculating it alone is not a hypothesis test.
- Descriptive statistics helps inspect the sample before inference.
- The released One Median manual section establishes the workflow. Its example accidentally says âmeanâ; the surrounding section and implementation identify a median test.
- The official Gnumeric 1.12.62 source archive contains the exact menu, dialog and calculation files used here. The shipped sign-test regression test provides another expected output, not evidence that we ran that test.
Check boundary: Headless checks covered ordinary median, sign-count and binomial formulas for the example, reversed signs, balanced signs, a literal zero below the hypothesis, and a tie changed to a positive reading. They do not validate the tool’s generated array formulas, dialog interactions, all-tie/empty/error cases or the separate Wilcoxon workflow.