How to choose probability to predict success in logistic regression?

I'm working through a logistic regression example from the lab on logistic regression in Intro to Statistical Learning. When they try to test how accurate their model is they do,

glm.pred[glm.probs >.5] = "Up"


Essentially they are asking whether the predicted probability of a market increase is greater than or less than 0.5. But how did they choose the number 0.5? If there is another situation where probabilities are much lower for each prediciton, do we replace 0.5 with the mean(glm.probs)?

• They discuss that a bit in the credit card default example. 0.5 makes sense in so far as it means the more likely of the two categories is predicted (when there are just two categories and the two probabilities have to add up to 1), but depending on the cost of getting the prediction wrong in each direction this may or may not be the most important thing. – Björn Apr 15 '16 at 19:42
• @Björn Got it. So 0.5 makes sense because it is fairly even that the market will go up and down. But what if we have a situation where the probabilities of "up" are significantly lower (like avg = 0.02), and probability of "down" much higher (i.e. 0.98)? Is it ok to adjust the 0.5 'level' to 0.02? – jchaykow Apr 15 '16 at 19:45