<table><tr><td style="">sgerlach added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D21977">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123938">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:471</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">void</span> <span class="n">HypothesisTestPrivate</span><span style="color: #aa2211">::</span><span class="n">performOneWayAnova</span><span class="p">()</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #74777d">// all standard variables and formulas are taken from this wikipedia page:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #74777d">// https://en.wikipedia.org/wiki/One-way_analysis_of_variance</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">please put comments describing the function before the function. Take a look at what doxygen expects.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123939">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:476</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #74777d">// w stands for within groups</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">clearGlobalVariables</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">int</span> <span class="n">np</span><span class="p">,</span> <span class="n">total_rows</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">do we have global variables? If yes, why do we need them?<br />
Avoiding global vars is a good programming practise</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123944">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:489</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">double</span> <span class="n">y_bar</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">double</span> <span class="n">s_b</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">can you comment the variables? The names are not always self-explanatory (at least for me).</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123940">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:506</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span style="color: #aa4000">for</span> <span class="p">(</span><span style="color: #aa4000">int</span> <span class="n">i</span> <span style="color: #aa2211">=</span> <span style="color: #601200">0</span><span class="p">;</span> <span class="n">i</span> <span style="color: #aa2211"><</span> <span class="n">np</span><span class="p">;</span> <span class="n">i</span><span style="color: #aa2211">++</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span class="n">s_b</span> <span style="color: #aa2211">+=</span> <span class="n">ni</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span style="color: #aa2211">*</span> <span class="n">qPow</span><span class="p">(</span> <span class="p">(</span> <span class="n">mean</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span style="color: #aa2211">-</span> <span class="n">y_bar</span><span class="p">),</span> <span style="color: #601200">2</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">        <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">ni</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span style="color: #aa2211">></span> <span style="color: #601200">1</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">how efficient is qPow()? Does it make sense to use a gsl function for small inter powers to get better performance? See <a href="https://www.gnu.org/software/gsl/doc/html/math.html#small-integer-powers" class="remarkup-link" target="_blank" rel="noreferrer">https://www.gnu.org/software/gsl/doc/html/math.html#small-integer-powers</a></p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123947">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:544</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">m_stats_table</span> <span style="color: #aa2211">=</span> <span style="color: #766510">"<h3>Group Summary Statistics</h3>"</span><span class="p">;</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Can the following strings be made translatable? If yes, please do so.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123952">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:978</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">        <span style="color: #aa4000">case</span> <span class="n">HypothesisTest</span><span style="color: #aa2211">::</span><span style="color: #a0a000">TailTwo</span><span class="p">:</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">p_value</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span class="n"><span class="bright">nsl_stats_tdist_p</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span class="n"><span class="bright">value</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">df</span></span><span class="bright"></span><span class="p"><span class="bright">)</span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">+</span></span><span class="bright"> </span><span class="n"><span class="bright">nsl_stats</span>_tdist_<span class="bright">p</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">-</span></span><span class="bright"></span><span style="color: #601200"><span class="bright">1</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="n">value</span><span class="p">,</span> <span class="n">df</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span class="n">p_value</span> <span style="color: #aa2211">=</span> <span class="bright"></span><span style="color: #601200"><span class="bright">2.</span></span><span class="bright"></span><span style="color: #aa2211"><span class="bright">*</span></span><span class="bright"></span><span class="n"><span class="bright">gsl_cdf</span>_tdist_<span class="bright">P</span></span><span class="bright"></span><span class="p"><span class="bright">(</span></span><span class="n">value</span><span class="p">,</span> <span class="n">df</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">this is only correct, when the distribution is symmetric? Is this true for the t-distribution?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123953">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTest.cpp:994</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">            <span class="n">value</span> <span style="color: #aa2211">*=</span> <span style="color: #aa2211">-</span><span style="color: #601200">1</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">p_value</span> <span style="color: #aa2211">=</span> <span class="n">nsl_stats_tdist_p</span><span class="p">(</span><span class="n">value<span class="bright"></span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">df</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">            <span class="n">p_value</span> <span style="color: #aa2211">=</span> <span class="n">nsl_stats_tdist_p</span><span class="p">(</span><span class="n">value<span class="bright"></span></span><span class="bright"> </span><span style="color: #aa2211"><span class="bright">-</span></span><span class="bright"> </span><span class="n"><span class="bright">mean</span></span><span class="bright"></span><span class="p"><span class="bright">,</span></span><span class="bright"> </span><span class="n"><span class="bright">sp</span></span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">            <span class="n">printLine</span><span class="p">(</span><span style="color: #601200">0</span><span class="p">,</span> <span class="n">i18n</span><span class="p">(</span><span style="color: #766510">"Null Hypothesis: Population mean of %1 %2 Population mean of %3 "</span><span class="p">,</span> <span class="n">col1_name</span><span class="p">,</span> <span class="n">UTF8_QSTRING</span><span class="p">(</span><span style="color: #766510">"≤"</span><span class="p">),</span> <span class="n">col2_name</span><span class="p">),</span> <span style="color: #766510">"blue"</span><span class="p">);</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">not gsl_cdf_gaussian_P?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123955">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTestDock.cpp:77</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">    test_type_t_z.append("Two Sample Independent");</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">    test_type_t_z.append("Two Sample Paired");</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">if the following strings are user visible please add "i18n()".</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123956">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTestDock.cpp:253</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"><span style="color: #aa4000">void</span> <span class="n">HypothesisTestDock</span><span style="color: #aa2211">::</span><span class="n">show<span class="bright">Hypothesis</span>Test</span><span class="p">()</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d">void HypothesisTestDock::showTest<span class="bright">Type</span>() {</span>
</div><div style="padding: 0 8px; margin: 0 4px; "><span style="color: #74777d">    ttest = ui.cbTest->currentText() == "T Test";</span>
</div><div style="padding: 0 8px; margin: 0 4px; "><span style="color: #74777d">    ztest = ui.cbTest->currentText() == "Z Test";</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">please use cbTest->currentItem() and a matching enum (see above)</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D21977#inline-123954">View Inline</a><span style="color: #4b4d51; font-weight: bold;">HypothesisTestDock.h:77</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">bool</span> <span class="n">two_sample_independent</span><span class="p">{</span><span style="color: #304a96">false</span><span class="p">};</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">bool</span> <span class="n">two_sample_paired</span><span class="p">{</span><span style="color: #304a96">false</span><span class="p">};</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">can we collect all the bool vars in an enum or a bit-field. Do we even need all of them (one_way=false is equal to two_way=true and vice-versa)?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R262 LabPlot</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D21977">https://phabricator.kde.org/D21977</a></div></div><br /><div><strong>To: </strong>devanshuagarwal, sgerlach, asemke<br /><strong>Cc: </strong>kde-edu, LabPlot, narvaez, apol<br /></div>