I’ve seen it a lot of times. For example, to calculate the standard deviation in a sample we use
S = root ( summation |x-x|2)/(n-1) instead of simply “n” for a population
I prefer the simplest answer possible over a math demonstration (maybe with an example?) because I learn more in that way. Thanks!
Edit: I put the example of the standard deviation, but I want to understand it in an abstract way. I’ve seen n-1 in physics, chemistry, economics etc etc!
Videos
What does N-1 mean in IT?
What does N+1 redundancy mean?
What is the difference between N+1 and 2N redundancy?
function sum(arr, n) { if(n <= 0) { return 0; } else { return sum(arr, n - 1) + arr[n - 1]; } }
Your sequence will be a bunch of terms: and we can refer to each term by its index. The fifth term is
. The
th term is
and so on.
If we pick some arbitrary term but want to indicate it might be any term we can call it be an arbitrary index. is the
-th term. It could be the
th term,
or it could by the
th term,
. We don't know and don't care. We are refering to a non-specific term.
We are refering to a term when we don't know what position it is in. We say "let's call the position it is in: ".
Now, let's suppose I said "After picking that term look at the previous term" or "look at the next term". How can we refer to that. We if our term was the then the previous term would be ....
. And if our term was
the next term would be ....
.
But how do we refer to it in general. If our term was what is the term immediately before it. Well, if this was the
th term, the one write before it is the
th term,
.
So in this case:
means. "Pick any term. It is equal to the term before it plus two".
So if the previous term was equal to
then this term,
will be equal to
.
So because we were told so.
And the previous term plus
.
And and so on...
.....
Recursive functions define values in terms of previous values.
In your case, the definition of says that the first value is
and we get the
th value by adding
to the previous value.
So
,
, etc.
i’ve recently gotten into trading, and i keep seeing “n:1” or “1:n” and was curious what it meant. i can’t think of anything that makes sense, but i hope it’s not super obvious 😅