예제 #1
0
 def testLookupPValue_LargeDegreesOfFreedom_LastRowIsUsed(self):
   # The last row of the table should be used.
   self.assertEqual(0.02, ttest._LookupPValue(2.365, 100.0))
예제 #2
0
 def testLookupPValue_ZeroTValue_FirstColumnIsUsed(self):
   # The largest possible p-value will be used when t is zero.
   self.assertEqual(1.0, ttest._LookupPValue(0.0, 1.0))
   self.assertEqual(1.0, ttest._LookupPValue(0.0, 2.0))
예제 #3
0
 def testLookupPValue_SmallTValue_FirstColumnIsUsed(self):
   # The largest possible p-value will be used when t is almost zero.
   self.assertEqual(1.0, ttest._LookupPValue(0.1, 2.0))
   self.assertEqual(1.0, ttest._LookupPValue(-0.1, 2.0))
예제 #4
0
 def testLookup_DFAndTValueBetweenTwoValues_SmallerRowAndColumnIsUsed(self):
   self.assertEqual(0.1, ttest._LookupPValue(2.0, 45.0))
   self.assertEqual(0.1, ttest._LookupPValue(-2.0, 45.0))
예제 #5
0
 def testLookupPValue_LargeTValue_LastColumnIsUsed(self):
   # The smallest possible p-value will be used when t is large.
   self.assertEqual(0.01, ttest._LookupPValue(500.0, 1.0))
   self.assertEqual(0.01, ttest._LookupPValue(-500.0, 1.0))
예제 #6
0
 def testLookupPValue_TValueBetweenTwoValues_SmallerColumnIsUsed(self):
   # The second column is used because 3.1 is below 4.303,
   # so the next-lowest t-value, 2.920, is used.
   self.assertEqual(0.2, ttest._LookupPValue(3.1, 2.0))
   self.assertEqual(0.2, ttest._LookupPValue(-3.1, 2.0))
예제 #7
0
 def testLookup_DFBetweenTwoValues_SmallerRowIsUsed(self):
   self.assertEqual(0.05, ttest._LookupPValue(2.228, 45.0))
   self.assertEqual(0.05, ttest._LookupPValue(-2.228, 45.0))
예제 #8
0
 def testLookupPValue_LargeDegreesOfFreedom_LastRowIsUsed(self):
     # The last row of the table should be used.
     self.assertEqual(0.02, ttest._LookupPValue(2.365, 100.0))
예제 #9
0
 def testLookupPValue_ExactMatchInTable(self):
   """Tests looking up an entry that is in the table."""
   self.assertEqual(0.1, ttest._LookupPValue(3.182, 3.0))
   self.assertEqual(0.1, ttest._LookupPValue(-3.182, 3.0))
예제 #10
0
 def testLookupPValue_ZeroTValue_FirstColumnIsUsed(self):
     # The largest possible p-value will be used when t is zero.
     self.assertEqual(1.0, ttest._LookupPValue(0.0, 1.0))
     self.assertEqual(1.0, ttest._LookupPValue(0.0, 2.0))
예제 #11
0
 def testLookupPValue_SmallTValue_FirstColumnIsUsed(self):
     # The largest possible p-value will be used when t is almost zero.
     self.assertEqual(1.0, ttest._LookupPValue(0.1, 2.0))
     self.assertEqual(1.0, ttest._LookupPValue(-0.1, 2.0))
예제 #12
0
 def testLookupPValue_LargeTValue_LastColumnIsUsed(self):
     # The smallest possible p-value will be used when t is large.
     self.assertEqual(0.01, ttest._LookupPValue(500.0, 1.0))
     self.assertEqual(0.01, ttest._LookupPValue(-500.0, 1.0))
예제 #13
0
 def testLookup_DFAndTValueBetweenTwoValues_SmallerRowAndColumnIsUsed(self):
     self.assertEqual(0.1, ttest._LookupPValue(2.0, 45.0))
     self.assertEqual(0.1, ttest._LookupPValue(-2.0, 45.0))
예제 #14
0
 def testLookup_DFBetweenTwoValues_SmallerRowIsUsed(self):
     self.assertEqual(0.05, ttest._LookupPValue(2.228, 45.0))
     self.assertEqual(0.05, ttest._LookupPValue(-2.228, 45.0))
예제 #15
0
 def testLookupPValue_TValueBetweenTwoValues_SmallerColumnIsUsed(self):
     # The second column is used because 3.1 is below 4.303,
     # so the next-lowest t-value, 2.920, is used.
     self.assertEqual(0.2, ttest._LookupPValue(3.1, 2.0))
     self.assertEqual(0.2, ttest._LookupPValue(-3.1, 2.0))
예제 #16
0
 def testLookupPValue_ExactMatchInTable(self):
     """Tests looking up an entry that is in the table."""
     self.assertEqual(0.1, ttest._LookupPValue(3.182, 3.0))
     self.assertEqual(0.1, ttest._LookupPValue(-3.182, 3.0))