Rewriting bionomial sum using partial derivative

In summary, the conversation involves a discussion about finding the expected amount of steps to the right in a binomial experiment. The author uses a "trick" to rewrite the equation and then takes the partial derivative to find the expected value. The confusion arises when the author treats p and q as separate variables, and then later applies the condition p+q=1. However, this is justified by the fact that the expression is just a function and can be evaluated at any value of q, including q=1-p. This is an example of using calculus to calculate a value without any statistical interpretation.
  • #1
Nikitin
735
27
Hi. Assume there's a probability ##q## for a guy to take a step to the right, and ##p=1-q## to take one to the left. Then the probability to take ##n## steps to the right out of ##N## trials is ##P(n) = {{N}\choose{n} }q^n p^{N-n}##.

Now, what is ##<n>##? My textbook in statistical physics says ##<n> = \sum_{n=0}^N n{{N}\choose{n}} q^n p^{N-n} = q \frac{\partial}{\partial q} \sum_{n=0}^N {{N}\choose{n} }q^n p^{N-n} = q \frac{\partial}{\partial q} (q+p)^N = qN##

OK, fair enough.. But what about the fact that ##(q+p)^N=1## ? Shouldn't this mean you're taking the partial derivative of a constant, and thus it equals 0? What am I missing here?
 
Last edited:
Physics news on Phys.org
  • #2
I can see no place where the "partial derivative" comes into this. Since p+ q= 1, your equation [itex](q+ p)^N= 1[/itex] is simply [itex]1^N= 1[/itex]. What variable are you taking the partial derivative with respect to?
 
  • #3
I'm taking it with respect to ##q##.. Or, rather, my textbook is. I'm kind of confused as well.

The author wants to find ##<n>##, the expected amount of steps to the right, by doing a "trick":

First he rewrites ##<n>## from ##<n> = \sum_{n=0}^N n{{N}\choose{n}} q^n p^{N-n}## into ##<n> = q \frac{\partial}{\partial q} \sum_{n=0}^N {{N}\choose{n} }q^n p^{N-n}##

Then, since

##\sum_{n=0}^N {{N}\choose{n}} q^n p^{N-n} = (q+p)^N##

This must be true:

##<n> = \sum_{n=0}^N n{{N}\choose{n}} q^n p^{N-n} = q \frac{\partial}{\partial q} \sum_{n=0}^N {{N}\choose{n} }q^n p^{N-n} = q \frac{\partial}{\partial q} (q+p)^N =qN (q+p)^{N-1} = qN##

What I don't understand is how it's legal to take the partial derivative of something (in this case, ##(q+p)^N##) that's equal to 1, and not get 0.

EDIT: I also fixed a type in OP: the ##<n>## was misplaced outside the summation sign.
 
Last edited:
  • #4
Here you are treating q as a real variable, and p, n and N as constants. So basically you are defining a function f(q), and taking its derivative.
 
  • #5
The textbook didn't have to enforce the condition p+q = 1 in order to do the trick.

For a function F(x,y) of two variables , there is a difference between [itex]{ \frac{\partial F(x,y)}{\partial x}} _{|_{ x=q,\ y=1-q}}[/itex] and [itex]{ \frac{\partial F(x,1-x)}{\partial{x}}}_{|_{x=q}} [/itex]
 
  • #6
Nikitin said:
Hi. Assume there's a probability ##q## for a guy to take a step to the right, and ##p=1-q## to take one to the left. Then the probability to take ##n## steps to the right out of ##N## trials is ##P(n) = {{N}\choose{n} }q^n p^{N-n}##.

Now, what is ##<n>##? My textbook in statistical physics says ##<n> = \sum_{n=0}^N n{{N}\choose{n}} q^n p^{N-n} = q \frac{\partial}{\partial q} \sum_{n=0}^N {{N}\choose{n} }q^n p^{N-n} = q \frac{\partial}{\partial q} (q+p)^N = qN##

OK, fair enough.. But what about the fact that ##(q+p)^N=1## ? Shouldn't this mean you're taking the partial derivative of a constant, and thus it equals 0? What am I missing here?

First, regard p and q as two separate variables when differentiating ##P(n)## wrt ##q## and summing over n. Then, after finishing you can finally put ##q = 1-p##. This is not really any different from evaluating ##\sum_{n=1}^N n 2^n## by first differentiating ##\sum_{n=1}^N n x^n## wrt ##x##, then putting in ##x=2## later.
 
  • #7
But how is this legal? You are differentiating something that is 1, yet you do not get 0? This seems very un-mathematical.
 
  • #8
Nikitin said:
But how is this legal? You are differentiating something that is 1, yet you do not get 0? This seems very un-mathematical.

The expression represents something, an expectancy value for a certain binomial situation where the probability is p.

But, the expression can also be treated differently. Assuming q is a real variable, it is no longer the expectancy value of anything, just a function. But, after plugging in q = 1-p, we find that we have the same thing.

Finding that the function is the derivative of a certain other function is just calculus. And this other function is easier to deal with, and we know its value at q = 1-p. By plugging, we see that we end up with the value we wanted to find. This is an example of using calculus just to calculate a certain value, and the calculation does not need any statistical interpretation. We just wanted to find the value.
 
  • Like
Likes 1 person
  • #9
Nikitin said:
But how is this legal? You are differentiating something that is 1, yet you do not get 0? This seems very un-mathematical.

Which message are you responding to? Please use the Quote button---which is put there for a good reason.

Have you looked at my response (post #6)? That says it all, but since you seem to be missing something, here goes again. We certainly have
[tex] (x+y)^n = \sum_{k=0}^n {n \choose k} x^k y^{n-k} [/tex]
for ANY ##x## and ##y##. Do you accept that
[tex] x \frac{\partial}{\partial x} (x+y)^n = n x (x+y)^{n-1}?[/tex]
Do you accept that
[tex] x \frac{\partial}{\partial x} \sum_{k=0}^n {n \choose k} x^k y^{n-k}
= \sum_{k=0}^n k {n \choose k} x^k y^{n-k}? [/tex]
If you accept these equations then you are forced---no choice--- to accept the equation
[tex] x n (x+y)^{n-1} = \sum_{k=0}^n k {n \choose k} x^k y^{n-k} [/tex]
for ANY ##x## and ##y##. What is now preventing you from putting ##x=q, y = 1-q##?
 
  • Like
Likes 1 person
  • #10
Ray: The calculus in itself was never the issue.

Guys, what confused me was that it's OK to define away the fact that p+q = 1 in the first moment, and then apply it in the next for convenience. But fair enough, I see things from a different perspective now. At the end of the day there's no mathematical reason you can't do it.
 
Last edited:

Related to Rewriting bionomial sum using partial derivative

1. How do I rewrite a bionomial sum using partial derivatives?

To rewrite a bionomial sum using partial derivatives, you can use the binomial theorem, which states that (a + b)^n = Σ (n choose k) * a^(n-k) * b^k, where n is the power, k is the index of summation, and (n choose k) is the binomial coefficient. From there, you can use the chain rule to take the partial derivative of each term.

2. Can I use partial derivatives to rewrite any bionomial sum?

Yes, you can use partial derivatives to rewrite any bionomial sum. This method is particularly useful when dealing with complicated expressions involving multiple variables.

3. What is the purpose of rewriting bionomial sums using partial derivatives?

The purpose of rewriting bionomial sums using partial derivatives is to simplify and manipulate expressions in order to make them easier to work with and to solve problems in calculus and other fields of mathematics.

4. Are there any special rules or techniques for rewriting bionomial sums using partial derivatives?

Yes, there are a few special rules and techniques that can help make the process of rewriting bionomial sums using partial derivatives more efficient. These include using the binomial theorem, the chain rule, and the product rule.

5. Can rewriting bionomial sums using partial derivatives be used in real-world applications?

Yes, rewriting bionomial sums using partial derivatives has many real-world applications, particularly in fields such as physics, economics, and engineering. It can be used to solve optimization problems, model complex systems, and calculate rates of change in various scenarios.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
691
  • Calculus and Beyond Homework Help
Replies
3
Views
446
  • Calculus and Beyond Homework Help
Replies
3
Views
510
  • Calculus and Beyond Homework Help
Replies
4
Views
693
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
845
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
375
  • Advanced Physics Homework Help
Replies
2
Views
1K
Replies
33
Views
3K
Back
Top