Suppose we want to identify the frequency of default on a portfolio with a 1000 loans. In the independence case, each firm’s default process follows a Bernoulli distribution with parameter $p = 0.01$. 

That is, each firm has 1% probability of an independent default. This can be represented by indicator
functions ${Y\_i},i=1,...,1000$, where $P(Y\_i = 1) = p$.

In the correlated case, all the firms have a common
factor $X$ (here it could be a macro variable, for instance) and their default processes can be represented by $Y\_i = I\_{X\_i<a}$ where $X\_i = X +ε\_i$, and $X ∼ N(0,1)$ and $ε\_i ∼ N(0,b)$,$i = 1,...,1000$. All $ε$’s
are independent from each other and from $X$. 

Let $M = \sum\_{i=1}^{1000}Y\_i$ represent the number of defaults in your portfolio.
What is the relation between $a$ and $b$ such that the marginal probability of default for each firm is still 1% and how can I calculate the default correlation $ρ(Y\_i,Y\_j)$ as a function of $a$ and $b$?