Created attachment 109462 [details] Sample Spreadsheet showing the test Summary: When using the Data->Statistics->t-test menu, one can get a dialog box to auto-generate a paired t-test. By default, the test is done with the hypothesis that the mean difference is 2 (always the number two), while in almost every case everybody wants to test the hypothesis of equal means (difference zero). Once the table is generated, it's easy to work around this bug, by storing 0 in the cell "Hypothesized Mean Difference" (by default, it's 2). But, it's very misleading. The hypothesized mean difference is not shown in the dialog box, and the generated "hypothesized mean difference" cell is hidden in many cells of various statistics. Steps to reproduce: Create two columns of numbers. Select the data. Go to Data->Statistics->t-test Select an output cell Click OK Observed behavior: The p-value of the test is computed based on the null hypothesis : mean((column A)-(column B)) = 2 Expected behavior: The p-value of the test is computed based on the null hypothesis : mean((column A)-(column B)) = 0 Bugfix: In file sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx Replace the two lines: aOutput.writeValue(2); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current()); With: aOutput.writeValue(0); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current());
On pc Debian x86-64 with master sources updated today, I could reproduce this. It's been implemented like this since the beginning: http://cgit.freedesktop.org/libreoffice/core/commit/?id=88bece824dd012d9d9ec2812b5ba5ddd3311a5fe Tomaz: any idea? Should we change the value, or should the parameter be part of a ui dialog?
I think André's solution is good enough - except I will move "Hypothesized Mean Difference" to the top, below "Alpha". I want to move as much parameters out of the dialog as it is much easier to adjust the values afterwards without invoking the dialog again. Alpha for example is not part of the dialog too. André thanks for reporting this.
Ups.. forgot to put fdo number in the commit! Anyway - solved by: http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b30907a926890f835c094a5afdf4c0e6d8a1d19
Backport for 4-3 - https://gerrit.libreoffice.org/#/c/12449/
https://gerrit.libreoffice.org/#/c/12449/ pushed now. Thank you Tomaz for your feedback!