[Libreoffice-bugs] [Bug 132983] LibreOffice.calc data|statistics|z-test repeated results

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 5 03:54:37 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=132983

Felipe Viggiano <felipeviggiano at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|NOTABUG                     |---
     Ever confirmed|0                           |1

--- Comment #3 from Felipe Viggiano <felipeviggiano at gmail.com> ---
Doing a little research on google and found this website doing some explanation
about Z-Test:
https://www.solver.com/z-test-two-sample-means

When running the example in Calc and manually inserting the variances in the
cells of the Z-Test results, the output was identical to the example on the
website.

So, the known variance should not be zero, and Calc should be able to calculate
it from the data given in the dialog.

I' not a developer myself (just starting to learn), but looking in the codes
(core/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx), and it appears that the
Know Variance values are set to zero:

// Known Variance
    aOutput.writeString(ScResId(STR_ZTEST_KNOWN_VARIANCE));
    aOutput.nextColumn();
    aOutput.writeValue(0); <------
    aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE1%",
aOutput.current());
    aOutput.nextColumn();
    aOutput.writeValue(0); <------
    aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE2%",
aOutput.current());
    aOutput.newLine();




Perhaps if the output was changed to something like:

    aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)");
    aTemplate.autoReplaceAddress("%VAR_VARIABLE1%", aOutput.current());
    aOutput.writeFormula(aTemplate.getTemplate());

and 

   aTemplate.setTemplate("=VAR(%VARIABLE2_RANGE%)");
    aTemplate.autoReplaceAddress("%VAR_VARIABLE2%", aOutput.current());
    aOutput.writeFormula(aTemplate.getTemplate());


I believe this could remove the #DIV/0! error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200905/a14be16b/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list