Created attachment 109462 [details]
Sample Spreadsheet showing the test
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
The p-value of the test is computed based on the null hypothesis : mean((column A)-(column B)) = 2
The p-value of the test is computed based on the null hypothesis : mean((column A)-(column B)) = 0
In file sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
Replace the two lines:
On pc Debian x86-64 with master sources updated today, I could reproduce this.
It's been implemented like this since the beginning:
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:
Backport for 4-3 - https://gerrit.libreoffice.org/#/c/12449/
https://gerrit.libreoffice.org/#/c/12449/ pushed now.
Thank you Tomaz for your feedback!