Should you launch a new website design? A higher conversion rate could bring more profit, but launching has a cost. A utility assigns a number to an outcome: higher numbers represent outcomes you prefer. A utility function extends this idea by assigning a value to every possible conversion rate, rather than only labeling rates “high” or “low.” section 12.1 section 12.3
Let r be the new design’s conversion rate. With 10,000 monthly visitors, $100 profit per conversion, and a $20,000 launch cost, the utility of launching is 1,000,000r − 20,000. At r = 0.10, that gives $80,000; at r = 0.20, it gives $180,000. If the current design stays at its assumed 0.10 conversion rate, not launching has a constant utility of $100,000. section 12.4
Table 12.2 Utility of launching and not launching the new website design under many scenarios
|
Action
|
If 𝑟 = 0.00
|
If 𝑟 = 0.01
|
…
|
If 𝑟 = 1.00
|
|
Launch
|
−20,000
|
−10,000
|
…
|
980,000
|
|
Do nothing
|
100,000
|
100,000
|
…
|
100,000
|
Compare the two actions across sample conversion rates: launching changes value as r changes, while doing nothing stays at $100,000. section 12.4
Which action is better when r is uncertain? Compare their expected utilities: average each action’s utility across possible rates, accounting for how probable those rates are. Here, r follows a Beta(64, 438) distribution. When calculating that average directly is difficult, draw rates from the distribution, calculate a utility for each draw, and average the results. section 12.4 section 12.5
np.random.seed(0)
r_samples = np.random.beta(
64, 438, #A
size=100_000 #B
)
utility_samples = utility_launch(r_samples) #C
expected_utility = utility_samples.mean() #DThe NumPy example draws 100,000 possible conversion rates, applies the launch utility function to them, and takes their mean. section 12.5
Choosing whether to launch
The sampled expected utility of launching is about $107,496, compared with $100,000 for keeping the current design. Under these assumptions, launching has the higher expected utility. The choice depends on both the uncertain conversion rate and the consequences encoded in the utility functions. section 12.5


