# A Frequentist approach to modeling uncertainty around decision optimization

I'm curious about how a Frequentist would approach an optimization problem, where said problem is constructed using inferred parameters. As an example, I'll use price optimization given a demand curve. $$Revenue(x) = Price * Volume$$. Let's assume my demand curve follows exponential decay.

1. Infer demand curve parameters
2. Maximize $$Revenue(X)$$

I can perform linear regression, given price and the log of the sales volume, to infer the slope and intercept. Using a Bayesian approach, I'll have a posterior chain to sample from. So, if I have 4000 samples in my posterior chain, I can uniformly draw indices in the range [1, 4000], and retrieve their corresponding slope and intercept values then use them to visualize my revenue function.

Big edit: Code included

• simulate data
sd = 0.5
m,b = -0.25, 5
X = np.linspace(0,20,100)
Y = np.exp(np.random.normal(loc=m*X+b, scale=sd))
plt.scatter(X,Y)


• Model w/ PyMC3
with pm.Model() as model:
m = pm.Normal('m',mu=0, sd=2)
b = pm.Normal('b',mu=0, sd=2)
s = pm.Exponential('s',lam=1)
y_hat = pm.math.dot(m, X) + b
lik = pm.Normal('lik', mu=y_hat, observed=pm.math.log(Y), sigma=s)
trace = pm.sample(chains=4)

• plot posterior-predictive distribution
def post_plot(trace_obj=trace,samples=100,size=len(X)):
for itr in range(samples):
idx = random.choice(range(size))
m = trace_obj.get_values('m')[idx]
b = trace_obj.get_values('b')[idx]
Y_hat = np.exp(m*X + b)
plt.plot(X,Y_hat)
plt.scatter(X,Y)

post_plot()


• Posterior predictive revenue
def rev_posterior(samples=100, size=len(X)):
for s in range(samples):
idx = random.choice(range(size))
m = trace.get_values('m')[idx]
b = trace.get_values('b')[idx]
rev = X * np.exp(m*X +b)
plt.plot(X, rev)
return

rev_posterior()


.

This is useful in two ways: (A) I can see the variance around the sales volume at the optimal price. And (B) I can see that each sampled function has a peak around the same spot; in other words, there's very little variance around where the optimal price is located.

My actual question: Using parameter estimates and confidence intervals, how might a Frequentist construct a similar revenue function plot? I understand that they could simply use the point estimates of the slope and intercept and then find a point estimate of the optimal price, but I'm curious about the variance around the optimal value.

For the code that simulated this data, generated this plot, and Bayesian model that inferred the posterior distribution, see here

• At the moment you have not shown any source of randomness or model parameters in your analysis. If you would like a clear exposition on how classical methods solve this problem then that would be helpful.
– Ben
Commented Nov 16, 2021 at 20:16
• @jbuddy_13, suppose a typical Bayesian analysis consists of steps A, B and C while frequentist analysis consists of steps D, E, F and G. Further suppose B does not have a conceptual counterpart among D, E, F og G. Then asking how a frequentist would do B does not necessarily make sense. E.g. "How do you select a prior in your model?" is not a relevant question to ask a frequentist. This is roughly what I meant above. Commented Nov 17, 2021 at 3:59
• To succeed, you need more than the parameter estimates and (individual) confidence intervals: you need a joint confidence region for all the parameters. The reason is that the location of the optimum is a highly nonlinear, non-bijective function of the parameters, rendering the usual approximations ("delta method") useless. I suspect many people would use a bootstrap, provided there are enough data to justify appealing to its asymptotic properties.
– whuber
Commented Nov 17, 2021 at 15:34
• @whuber, this makes sense! I've gotten some skepticism in previous comments here, and I'm on the fence whether my original Bayesian approach is principled or if I've gone awry with what the posterior distribution can truly support. Commented Nov 17, 2021 at 15:54
• The Bayesian approach to this problem is appealing--I see nothing invalid in it. It might be interesting to compare that to a nonparametric bootstrap, because of the relaxed assumptions required by the latter. Note that the Bayesian posterior has a different interpretation than a confidence interval (or, perhaps, confidence distribution), but it seems likely that in practice these results would be used in substantially similar ways for the same purposes.
– whuber
Commented Nov 17, 2021 at 16:00