Error probability estimate and confidence interval of Monte Carlo simulation
Compute the confidence interval for the simulation of a communication system that has 100 bit errors in 106 trials. The bit error rate (BER) for that simulation is .
Compute the 90% confidence interval for the BER of the system. The output shows that, with 90% confidence level, the BER for the system is between 0.0000841 and 0.0001181.
nerrs = 100; % Number of bit errors in simulation ntrials = 10^6; % Number of trials in simulation level = 0.90; % Confidence level [ber,interval] = berconfint(nerrs,ntrials,level)
ber = 1.0000e-04
interval = 1×2 10-3 × 0.0841 0.1181
nerrs— Number of errors
Number of errors from Monte Carlo simulation results, specified as a scalar.
ntrials— Number of trials
Number of trials from Monte Carlo simulation results, specified as a scalar.
level— Confidence level
Confidence level for a Monte Carlo simulation, specified as a scalar in the range [0, 1].
errprobest— Error probability estimate
Error probability estimate for a Monte Carlo simulation, returned as a scalar.
If the errors and trials are measured in bits, the error probability is the bit error rate (BER).
If the errors and trials are measured in symbols, the error probability is the symbol error rate (SER).
interval— Confidence interval
Confidence interval for a Monte Carlo simulation, returned as a two-element column
vector that lists the endpoints of the confidence interval for the confidence level
specified by the input
 Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan. Simulation of Communication Systems. Second Edition. New York: Kluwer Academic/Plenum, 2000.