From a7937b800cead589adadecde15d38e62429ae520 Mon Sep 17 00:00:00 2001 From: Todd Tao Date: Fri, 12 Jul 2019 10:41:08 +0800 Subject: [PATCH] PercentileRanks(self, xs) param error PercentileRanks(self, xs) param is xs, but use x in function body ``` def PercentileRanks(self, xs): """Returns the percentile ranks of the values in xs. xs: potential value in the CDF returns: array of percentile ranks in the range 0 to 100 """ return self.Probs(x) * 100 ``` --- thinkbayes2/thinkbayes2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thinkbayes2/thinkbayes2.py b/thinkbayes2/thinkbayes2.py index a9e48c93..fe3ff099 100644 --- a/thinkbayes2/thinkbayes2.py +++ b/thinkbayes2/thinkbayes2.py @@ -1223,7 +1223,7 @@ def PercentileRanks(self, xs): returns: array of percentile ranks in the range 0 to 100 """ - return self.Probs(x) * 100 + return self.Probs(xs) * 100 def Random(self): """Chooses a random value from this distribution."""