Cost estimation and risk analysis