# “Weighted” Percentages

I have data that looks like

| Product | Number Sold | Number Returned | Percent Returned |
|---------+-------------+-----------------+------------------|
| A       |          30 |              29 |            96.7% |
| B       |          15 |               3 |             6.7% |
| C       |           1 |               1 |             100% |


Is there a better way to understand the rate of product return other than the percent returned? Having 29 out of 30 products returned seems way worse than having 1 out of 1 returned.

• Right... Who knows whether product "C" is a winner, but it just so happened that the person who bought it was not representative of the targeted demographic... I really don't know if there is a technique, but common sense tells me that the only way of encapsulating this uncertainty would have to introduce noise. – Antoni Parellada Aug 3 '16 at 19:27
• Maybe some answers hereMaybe some answers [here] will help. : stats.stackexchange.com/questions/225975/… – roundsquare Aug 3 '16 at 19:56

I would estimate the probability each of the items is returned and report those estimates. However, to make this estimate I would not use the MLE (number of returns/number sold) but would instead use a Bayesian analysis. You can formulate the problem (using a beta-binomial model) so that you just add some number, $\alpha$, to the number of returns and some number, $\alpha + \beta$, to the number sold in order to weigh your estimates towards $\frac{\alpha}{\alpha + \beta}$.

This is subjective, but if you're transparent about what you're doing and why then it's not cheating. The whole reason "29 out of 30 products returned seems way worse than having 1 out of 1 products returned" is because you don't believe that 100% of product C will be returned due to the small sample size. This is a totally reasonable assumption and by weighing your results towards $\frac{\alpha}{\alpha + \beta}$ you are liking getting better results.

Bayesian analysis allows you to formally perform analysis where you weigh estimates like this. Formulating your problem like a Bayesian, let $X_{A} =$ number of product $A$ returned.

$$X_{p}\;|\;\theta_p ∼ \text{Binomial}(\theta_p, n_p), \; p \in {A,B,C}$$ $$\theta_p\;|\; \alpha, \beta ∼ \text{Beta}(\alpha, \beta), \; p \in {A,B,C}$$

where $n_p$ is a known, fixed number. This leads to,

$$\theta_p \;|\; X_{p} \sim \text{Beta}(\alpha + X_p, \beta + n_p - X_p)$$

which is a distribution of plausible values of $\theta_p$ given your data. The mean of this distribution is, $\frac{\alpha + X_p}{\alpha + \beta + n_p}$ which would become your estimate for $\theta_p$.

The values for $\alpha$ and $\beta$ will determine what number your results are weighed to and how aggressively. The ratio $\frac{\alpha}{\alpha + \beta}$ will be the number estimates are weighed towards and larger magnitude of $\alpha$ and $\beta$ will weigh results more aggressively.