We develop a mathematical model of 2D-coding monitoring scheme in passive optical networks (PONs). We derive the new expression for P D (detection probability) and P FA (false-alarm probability), which are used to find the optimal decision probability. We simulate the effect of the client separation distance, network size, pulse width, and the transmitted power on the performance of 2D-coding monitoring scheme, and the numerical results show that the suitable system variables can be chosen optimally to facilitate optimal decision.