What separates a popular production from a flop? While luck plays a small part, the most successful studios follow a rigorous formula that balances risk with reward.