1
$\begingroup$

I'm looking for a formula to subtract a percentage (e.g. $10\%$) from a number (e.g. $100$) a certain number of times (e.g. $4$) in which case:

$x=100$

$p=0,1$ (i.e. $10\%$)

$n=4$

Doing it manually goes like this:

  1. $y_1 = 100 - 10\% = 90$

  2. $y_2 = 90 - 10\% = 81$

  3. $y_3 = 81 - 10\% = 72.9$

  4. $y_4 = 72.9 - 10\% = 65.61$

The formulas for these steps I've managed to figure out are:

  1. $y_1 = x - 1\cdot px$
  2. $y_2 = x - 2\cdot px + 1\cdot p^2x$
  3. $y_3 = x - 3\cdot px + 3\cdot p^2x - 1\cdot 0.1^3x$
  4. $y_4 = x - 4\cdot px + 6\cdot p^2x - 4\cdot0.1^3x + 0.1^4x$

The formula 'grows' with each iteration.

Is there a single universal formula that would use $x$, $p$ to find $y_n$ for any $n$?

I suppose in function notation the question would look like $y = f(x,p,n)$.

$\endgroup$
1
  • 3
    $\begingroup$ It's very useful to make the mental connection that "subtracting" 10 per cent is actually multiplying by 0.9. So you're repeatedly multiplying by 0.9. $\endgroup$
    – Matti P.
    Jun 3, 2021 at 9:16

1 Answer 1

3
$\begingroup$

Note that instead of subtracting $0.1\cdot y_{n-1}$ from $y_{n-1}$, you can simple multiply $(1-0.1)\cdot y_{n-1}$. The factor $(1-0.1)$ doesn't depend on $n$, so the formula becomes much easier: since we multiply by $(1-0.1)$ at each iteration, we effectively multiply by $(1-0.1)^n$ after $n$ iterations.

The formula is

$$y_n=(1-p)^n x.$$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .