Margin of Safety: Formula and Analysis