I'm working on a project where the goal is to develop a scheme that computes the optimal solution to the following problem:
Consider a non-virtual loot box; a fix-priced bundle of distinct merchandise that differ in price, with varying probabilities for winning a specific merchandise. Determine the revenue-optimal combination of price and allocation probabilities. Incorporate a salvage mechanism by which a customer can trade in unwanted items for a partial refund.
I suppose we could determine the weighed averages of the outcomes:
$$E\lbrack X\rbrack=\sum_{i=1}^n x_i\,p_i$$
So if there are $n-$possibilities, we multiply their likelihood of occurring by their price and sum it all up. And we want it to be so that the sum of gross profit after $n-$times is greater than the price to open it $n-$times. We could then find different probability distributions that keep this net revenue $\gt 0$, by varying one parameter and changing the other(s) to compensate. But this seems to me a rather naive, brute-force approach.
Would it be correct to frame this problem as an optimization problem?
There are some constraints that must be satisfied:
$\sum_{i=1}^np_i=1$.
Suppose we set the lower bound to $0.1$ percent. Thus, for each $p_i\geq 0.001$.
Items within a box are categorized into multiple rarity classes (each item is assigned to a specific class),
and are allocated probabilities based on their currency values. Items of higher value should be assigned
lower probabilities. Thus, $p_1\leq p_2 \leq...\leq p_n$.The currency value $C$ of a particular box, that is, the cost to open should be bounded; obviously we can't have boxes costing thousands of dollars to open, so we bound $C$ to a reasonable range, perhaps $\lbrack 1,50\rbrack$. As an aside, the value of a particular item $\large c_i$ within a box can be greater than $C$.
$0 \leq c_1 \leq c_2 \leq ...\leq c_n$.
Also, consider the situation where a customer would like to take advantage of the salvage mechanic; we would need to determine the optimal fraction of $\large c_i$ to refund while still maintain positive revenue.
Lastly, if I'm not mistaken, the decision variables are $\{p_1,...,p_n\}$ and $C$.
I've only a superficial knowledge of optimization and would appreciate any insights in to formulating my problem mathematically as an optimization problem. My end goal would be something that's implementable in a modelling language to use with an optimization solver, or implementable in a general purpose programming language.