Changeset 1549


Ignore:
Timestamp:
04/10/09 15:21:06 (12 years ago)
Author:
abeham
Message:

Fixed a small bug in the MannWhitneyWilcoxonTest (#573)

Location:
trunk/sources/HeuristicLab.StatisticalAnalysis/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTest.cs

    r1548 r1549  
    234234          }
    235235          p2Idx++;
    236           R1 += (i - starti + 1) * commonRank / (rank - startRank + 1);
     236          R1 += (double)((i - starti + 1) * commonRank) / (double)(rank - startRank + 1);
    237237        } else {
    238238          p2Idx++;
     
    281281          }
    282282          p2Idx++;
    283           R1 += (i - starti + 1) * commonRank / (rank - startRank + 1);
     283          R1 += (double)((i - starti + 1) * commonRank) / (double)(rank - startRank + 1);
    284284        } else if (p1[i] < p2[p2Idx]) {
    285285          R1 += rank;
  • trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTestControl.cs

    r1548 r1549  
    6565      double[] p2 = ConvertStringToArray(p2TextBox);
    6666      if (p1.Length < 10 || p2.Length < 10) {
    67         MessageBox.Show("Sample size is too small to approximate, provide at least 10 samples in each population.");
    68         return;
     67        MessageBox.Show("Caution: Sample size is too small for good approximation, treat the results carefully. Provide at least 10 samples in each population.");
    6968      }
    7069      double alpha = Double.Parse(alphaTextBox.Text);
    7170      double pVal = MannWhitneyWilcoxonTest.TwoTailedTest(p1, p2);
    7271      if (pVal <= alpha) {
    73         resultLabel.Text = "The hypothesis H0 can be rejected at " + alpha.ToString() + ", the p-Value is " + pVal.ToString() + "\nThe samples are likely not to stem from the same distribution.";
     72        resultLabel.Text = "The hypothesis H0 can be rejected at " + alpha.ToString() + ", the approximated p-Value is " + pVal.ToString() + "\nThe samples are not likely to stem from the same distribution.";
    7473      } else {
    7574        resultLabel.Text = "The hypothesis H0 cannot be rejected at " + alpha.ToString();
Note: See TracChangeset for help on using the changeset viewer.