You may have heard of p-values in the context of hypothesis testing, with a vague (and technically incorrect 😉) idea that “If p-value is < 0.05, then the two groups are different”. This post explains the definition of p-value
and t-value
, their difference in usage and interpretation with examples in Python using cats 😸
P-value
p-value
is the probability of getting a result equal to or more extreme than what was observed, assuming that the Null hypothesis is true. In simple terms, it tells your what the odds are that your observed results could have happened by chance. Since p-value
is a probability, its value is always in the range of [0,1]
.
Suppose, that you want to test the hypothesis that the average weight of male British Shorthair (BSH) cats is 6kg
(13 lbs). You go to the vet and collect weights of 50 randomly selected male BSH cats, and the result you got is 6.6kg
. You ran some statistical tests to compute the p-value and it turned out to be 0.07
. How should you interpret…