When analyzing a bang-bang phase locked loop (BBPLL), the hard nonlinearity is often linearized for analysis purposes with limited accuracy. This paper presents an accurate mathematical model of a BBPLL based on Markov Chains that is valid for all operating conditions. The proposed methodology is used to compute the BBPLL output steady-state jitter probability density function (PDF). Based on the analytical model, the loop filter gain is also optimized to minimize the output jitter. The analytical results show close agreement with simulation.