Suppose I'm modeling the probability to apply for a bank loan as a function of gender.
I have then the following DAG:
Wikipedia lists 3 causes of endogeneity
There is measurement error. Suppose I know for sure whether someone is male or female, and whether he applied for a loan or not.
Then there is simultaneity, a.k.a. reverse causality. This must not be a problem, since applying for a loan can't change your gender (if you are a male, you can't become female by applying for a loan).
Then there is "omitted variable bias", which is defined as a "uncontrolled confounding variable". A confounder is a variable that causes both the independent variable and the dependent one. This must also not be a problem: nothing can cause gender, which is determined by the crossover of the DNA at conception.
My relationship may have unobserved mediators.
For instance, females may be segregated in lower paying jobs (they don't apply for STEM degrees) or part-time jobs (they have more family demands and have to take care for the children).
In this case, gender would cause income. Income also cause the probability to apply for a loan: if you are in a lower income bracket, you know the loan will be denied, and so you won't apply.
The DAG becomes:
Income would be a mediator, not a confounder.
Suppose I don't observe income.
Would this cause endogeneity?