I have a portfolio and I know how many loans the portfolio has in total $n$ and how many loans in the portfolio defaulted $d$. I also predicted one default rate for the portfolio $edf$. Hence, I am assuming the portfolio has a Binomial distribution with parameters $B(n, edf)$.
I calculate a realized default rate $rdf$ as $\frac{d}{n}$. Now I would like to calculate a confidence interval with confidence level $\alpha$ which shows where $\alpha$ percent of realizations from $B(n, edf)$ should fall. I want to take this confidence interval as an indicator if my model is working correctly, which means checking if $rdf$ falls within the confidence interval or not.
Option 1: Applying cumulative distribution function
Can I just use the cumulative distribution of the binomial distribution at $cdf_{binomial}(n, edf, \frac{(1 - \alpha)}{2})$ and $cdf_{binomial}(n, edf, 1 - \frac{(1 - \alpha)}{2})$?
OR
Option 2 based on t-value
Should I do sth like $$ Y_{expected} \pm (t * s) $$ where
- $Y_{expected} = n * edf$
- $t$ critical two-tailed t-value at $\alpha$ with $x$ degrees of freedom (How many degrees of freedom? How to calculate?)
- $s$ standard error $\sqrt{n * edf * (1- edf) }$ (Correct?)