Why is precision a useful metric if the dataset is not balanced? I don't see why precision is useful metric or why it is needed in addition to recall and specificity. 


*

*For example, if you have a dataset that has significantly more positive than negative data points i.e., 3:1 ratio, and the classifier performs well on the positive points but poorly on the negative points, then wouldn't precision still be high? So it wouldn't be a good way of assessing the tradeoff bet. accuracy on positive and negative points.

*Why isn't it a good idea to select the model based on the recall and specificity scores? 
 A: Precision and recall just look at prediction performance from different perspectives than sensitivity (= recall) and specificity. Which of those are useful will depend on what your goal is = want you want to optimize.
There are legitimate cases for using both. To give examples:


*

*As you said, in many cases you want to use sensitivity and specificity. Those give you information on how likely you correctly predict samples as positive $P$ samples, if they are actually $P$ - as well as negative $N$ samples, if they are actually $N$. Those metrics work fine if your goal is to minimize the share of wrong predictions on basis of looking at each individual class.

*However, in certain cases, you will also/instead want to look at the share of samples being predicted correctly in all samples predicted as being of a certain class, e.g. predicted to be $P$, and actually are $P$. An example would be medical scenarios, where you - lets say - have a 10⁶ chance of somebody having a certain disease, with a population of 10⁸ people to test (e.g. on yearly basis). In case you would have a sensitivity and specificity of both 0.99, 1 in 100 people actually having the disease would not be predicted as having it, which means for 1 in 10⁸ we don't detect the disease (lets say this is fine for this specific disease). But, a specificity of 0.99 is such a case would mean that 1 in 100 people not having the disease would be predicted as having such, which means that 10⁶ people would be false alarms - which might quite an amount to handle. In such cases, looking at the precision $P$ might help: it would indicate that the ratio of people actually having the disease in those being predicted as having the disease would be quite bad: $P = \frac{1}{1+10^6} \approx 10^{-6}$. This would not be reflected in sensitivity and specificity. In such scenario, you would additionally to/instead of maximizing sensitivity and specificity want to maximize the precision.
Of course you could also construct an example similar to the one in the second point, which would have a bad predictive performance that would not be visible in precision and recall, but would be in sensitivity and specificity. So, as said, which of those are useful will depend on what your goal is.
