# What is the difference between accuracy and precision?

I read the material on the difference betweeen accuracy and precision, but it makes me feel confused. Can I define accuracy as: $$accuracy=\frac{TruePositive+TrueNegative}{TruePositive+TrueNegative+FalsePositive+FlaseNegative}$$

So in machine learning, what is the difference between accuracy and precision?

• This picture is a good way to internalize the difference. (In machine learning, accuracy vs. precision is actually analogous to bias vs. variance, if you are familiar with that.) Oct 14 '16 at 4:04
• @GeoMatt22, thank you, can I define accuracy as :$$accuracy=\frac{TruePositive+TrueNegative}{TruePositive+TrueNegative+FalsePositive+FlaseNegative}$$ Oct 14 '16 at 4:25
• Aaah, now I see your confusion. "Accuracy" and "precision" are general terms throughout science (and have the sense indicated by the bullseye diagrams I linked to before). However in the particular context of Binary Classification these terms have very specific definitions. The chart at that Wikipedia page gives these. (Note that this context is more specialized than just "machine learning".) Oct 14 '16 at 4:34
However in the particular context of Binary Classification* these terms have very specific definitions. The chart at that Wikipedia page gives these, which are $$\mathrm{Accuracy}=\frac{\mathrm{True}}{\mathrm{Total}} \text{ , } \mathrm{Precision}=\frac{\mathrm{True\;Positive}}{\mathrm{All\;Positive}}$$ i.e. the fraction of cases that are correctly classified vs. the fraction of positives that are true.