# Thread: Derivitive to Find Maximization

1. ## Derivitive to Find Maximization

This question has ties to probability, but the question I am asking involves Calculus. See attachment.

I was able to construct A)... or at least I think so. See other attachment as I'm not quite familiar with latex.

2. As you found, $P(x) = \binom{10}{x}\pi^x(1 - \pi)^x$.

If $x = k$, then $P(x) = P(k) = \binom{10}{k}\pi^k(1 - \pi)^k$.

You are told to think of your function as a function of $\pi$. Therefore, let $P(\pi) = \binom{10}{k}\pi^k(1 - \pi)^k$.

Absolute maxima occur at critical numbers $c$ such that $f'(c) = 0$ or $f'(c)$ is undefined. Therefore, let's find $P'(\pi)$.

$P'(\pi) = \frac{d}{d\pi}[P(\pi)] = \frac{d}{d\pi}[\binom{10}{k}\pi^k(1 - \pi)^k] = \binom{10}{k}\frac{d}{d\pi}[\pi^k(1 - \pi)^k]$

Note $\binom{10}{k}$ can be 'factored' out of the derivative operator because it is a constant (scalar multiple).

$\binom{10}{k}\frac{d}{d\pi}[\pi^k(1 - \pi)^k] = \binom{10}{k}(\frac{d}{d\pi}[\pi^k] \times (1 - \pi)^k + \pi^k \times \frac{d}{d\pi}[(1 - \pi)^k])$

Note the use of the product rule because $\pi^k(1 - \pi)^k$ is a product.

$\binom{10}{k}(\frac{d}{d\pi}[\pi^k] \times (1 - \pi)^k + \pi^k \times \frac{d}{d\pi}[(1 - \pi)^k]) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1})$

Therefore, $P'(\pi) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1})$.

As you can see, there are no critical numbers $c$ such that $P'(c)$ is undefined. Now we only have to determine if there are any critical numbers $c$ such that $P'(c) = 0$.

$P'(\pi) = 0$

$\binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1}) = 0$

Since $\binom{10}{k}$ is a constant, we can eliminate it from the equation by dividing the equation by $\binom{10}{k}$.

$k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1} = 0$

$\pi^{k - 1}(1 - \pi)^k + \pi^k(1 - \pi)^{k - 1} = 0$

$\pi^{k - 1}(1 - \pi)^{k - 1}[(1 - \pi) + \pi] = 0$

I factored $\pi^{k - 1}(1 - \pi)^{k - 1}$ from both terms on the right-hand side of the equation. Since $(1 - \pi) + \pi = 1$, we have:

$\pi^{k - 1}(1 - \pi)^{k - 1} = 0$

$[\pi(1 - \pi)]^{k - 1} = 0$

$\pi(1 - \pi) = 0$

$\pi = 0$ or $\pi = 1$

3. I am now asked the question: Does your answer remind you of a familiar statistic commonly calculated to estimate pi? Is so, which one?

4. Originally Posted by NOX Andrew
$\binom{10}{k}(\frac{d}{d\pi}[\pi^k] \times (1 - \pi)^k + \pi^k \times \frac{d}{d\pi}[(1 - \pi)^k]) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1})$

Therefore, $P'(\pi) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k + k\pi^k(1 - \pi)^{k - 1})$.
Is that not:
$\binom{10}{k}(\frac{d}{d\pi}[\pi^k] \times (1 - \pi)^k + \pi^k \times \frac{d}{d\pi}[(1 - \pi)^k]) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k +(-1)k\pi^k(1 - \pi)^{k - 1})$ which gives#
$P'(\pi) = \binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k - k\pi^k(1 - \pi)^{k - 1})$

As you can see, there are no critical numbers $c$ such that $P'(c)$ is undefined. Now we only have to determine if there are any critical numbers $c$ such that $P'(c) = 0$.

$P'(\pi) = 0$

$\binom{10}{k}(k\pi^{k - 1}(1 - \pi)^k - k\pi^k(1 - \pi)^{k - 1}) = 0$

Since $\binom{10}{k}$ is a constant, we can eliminate it from the equation by dividing the equation by $\binom{10}{k}$.

$k\pi^{k - 1}(1 - \pi)^k - k\pi^k(1 - \pi)^{k - 1} = 0$

$\pi^{k - 1}(1 - \pi)^k - \pi^k(1 - \pi)^{k - 1} = 0$

$\pi^{k - 1}(1 - \pi)^{k - 1}[(1 - \pi) - \pi] = 0$

I factored $\pi^{k - 1}(1 - \pi)^{k - 1}$ from both terms on the right-hand side of the equation.
This gives $1-2\pi=0$, or $\pi=\frac{1}{2}$

However, you still have to take into account if $\pi^{k - 1}(1 - \pi)^{k - 1}$ is zero.

$\pi^{k - 1}(1 - \pi)^{k - 1} = 0$

$[\pi(1 - \pi)]^{k - 1} = 0$

$\pi(1 - \pi) = 0$

$\pi = 0$ or $\pi = 1$
Hence three values for pi. These will be either maxima or minima, however, note that when pi is 0 or 1, $P(\pi)$ is zero, regardless of what your value of k is.

To find out which is max and which is min explicitly, you should get the second derivative of $P(\pi)$ with respect to pi, and when it is negative, the function will be maximised.

As you don't know what k which value of pi is a max/min may also vary with k.