# confusion on outliers

I am not able to distinguish the outliers - When to go with std. dev and When do we need to go with Median. My understanding on std. dev. is - if the data is away from mean by more than 2 std dev. we consider that as outlier. Similarly for Median, we say that any data that is not in-between q1 and q3, we say again that as outlier.

So am confused which one to choose.

Can you guys help me understand.

It completely depends on the context of the data that is being considered. For example, $$2\sigma$$ from the mean ($$\mu$$), depends on the distribution of the data. What is the value of $$\mathbb{P}(-2\sigma < X - \mu <2\sigma)$$.