如何计算与金额相关的成功率(%)?

How calculate success (in %) related to amount?

想知道我所有客户之间的软件更新广告的成功率(百分比)。

我有以下公式,但我认为有些地方不对(根据初步结果),请参阅:

$success = round((($total_pcs_with_new_version) + (($total_pcs_with_old_version)))/100, 2);

/**

[====== Preliminary result ======]

$total_pcs_with_new_version = 13;
$total_pcs_with_old_version = 23

then result will be:

$success = 0.36%

**/

您的计算不正确:

$success = round($total_pcs_with_new_version * 100 /
                ($total_pcs_with_new_version + $total_pcs_with_old_version), 2);
  • new * 100 / total
  • 13 * 100 / 36 = 36.11