Open main menu

Biolecture.org β

Changes

Ttest-perl

683 bytes added, 18:23, 7 May 2018
Created page with "<p># ttest</p> <p>my @group1 = ();<br /> my @group2 = ();</p> <p># 두 샘플의 입력과정 어떻게 하죠?</p> <p>my $size1 = @group1;<br /> my $size2 = @group2;<br /> my..."
<p># ttest</p>

<p>my @group1 = ();<br />
my @group2 = ();</p>

<p># 두 샘플의 입력과정 어떻게 하죠?</p>

<p>my $size1 = @group1;<br />
my $size2 = @group2;<br />
my $sum1 = 0;<br />
my $sum2 = 0;</p>

<p>for($i=0;$i&lt;size1,$i++)<br />
{<br />
&nbsp; &nbsp;$sum1 += @group1[i];<br />
}</p>

<p>for($i=0;$i&lt;size2,$i++)<br />
{<br />
&nbsp; &nbsp;$sum2 += @group2[i];<br />
}</p>

<p>my $mean1 = $sum1 / $size1<br />
my $mean2 = $sum2 / $size2<br />
my $stdv1 = standardDeviation(@group1, 0)<br />
my $stdv2 = standardDeviation(@group2, 0)</p>

<p>my $t = ($mean1 - $mean2)/sqrt((($stdv1**2)/$size1 + ($stdv2**2)/$size2))<br />
# 다음 과정을 더 작성하자</p>
Anonymous user