Statistical Analysis and Optimization of Digital Systems