免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

[不等式] 关于二项式分布的众数

本帖最后由 hbghlyj 于 2022-3-18 08:45 编辑

删掉了...避免混淆...原图里面的解答里面的$k$跟题目里面的$k$字母用重复了...
解法见6#(原题是p:q=a)

本帖最后由 hbghlyj 于 2019-9-25 06:52 编辑

回复 1# hbghlyj
a=5
  1. Last /@ Last /@
  2.   Table[MaximalBy[
  3.     Table[{Coefficient[(5 x + 1)^n, x, i], i}, {i, 0, n}], First], {n,
  4.      1, 100}]
  5. {1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, \
  6. 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 30, \
  7. 31, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, \
  8. 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59, \
  9. 60, 60, 61, 62, 63, 64, 65, 65, 66, 67, 68, 69, 70, 70, 71, 72, 73, \
  10. 74, 75, 75, 76, 77, 78, 79, 80, 80, 81, 82, 83, 84}
复制代码
规律是遇到5的倍数重复一次
a=6
  1. Last /@ Last /@
  2.   Table[MaximalBy[
  3.     Table[{Coefficient[(6 x + 1)^n, x, i], i}, {i, 0, n}], First], {n,
  4.      1, 100}]
  5. {1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, \
  6. 18, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 30, 31, \
  7. 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, \
  8. 47, 48, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 60, \
  9. 61, 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, \
  10. 76, 77, 78, 78, 79, 80, 81, 82, 83, 84, 84, 85, 86}
复制代码
规律是遇到6的倍数重复一次

TOP

这样解得的是必要条件。只能说明${{\text{a}}_{\text{k}}} \geqslant {a_{k - 1}}$与${{\text{a}}_{\text{ ...
hbghlyj 发表于 2019-9-25 00:04


19092500018e42bc817400d948.png
2022-3-16 17:49

根据这两个不等式解出 $k$ 的范围,两侧系数都是单调的,不就是只有一个极值吗

TOP

这两个不等式说明了$k$的左边不减,右边不增,则$a_k$必是最大值,但觉得有风险,如果$k$恰好是$1或n$就有一个不等式无解了。

TOP

$$\binom{n}{\lfloor n/2\rfloor}=\max_k\binom nk$$
刚才Erdős-Ko-Rado定理那篇帖子里又遇到这个了

TOP

关于二项式分布的众数

本帖最后由 hbghlyj 于 2022-3-17 23:12 编辑

https://math.stackexchange.com/q ... nomial-distribution
Let $a_k=P(X=k)$, we have
$$a_k=\binom{n}{k}p^kq^{n-k}\qquad\text{and}\qquad a_{k+1}=\binom{n}{k+1}p^{k+1}q^{n-k-
1},$$
where as usual $q=1-p$ in binomial distribution.

We calculate the ratio $\dfrac{a_{k+1}}{a_k}$. Note that $\frac{\binom{n}{k+1}}{\binom{n}{k}}$ simplifies to $\frac{n-k}{k+1},$
and therefore
$$\frac{a_{k+1}}{a_k}=\frac{n-k}{k+1}\cdot\frac{p}{q}=\frac{n-k}{k+1}\cdot\frac{p}{1-p}.$$

From this equation we can follow:

\begin{align*}
k > (n+1)p-1 \implies a_{k+1} < a_k \\  
k = (n+1)p-1 \implies a_{k+1} = a_k \\
k < (n+1)p-1 \implies a_{k+1} > a_k
\end{align*}
  
The calculation (almost) says that we have equality of two consecutive probabilities precisely if $a_{k+1}=a_k$, that is, if $k=np+p-1$.  Note that $k=np+p-1$ implies that $np+p-1$ is an integer.


So if $k=np+p-1$ is not an integer, there is a single mode; and if $k=np+p-1$ is an integer, there are two modes, at $np+p-1$ and at $np+p$.  

Not quite! We have been a little casual in our algebra. We have not paid attention to whether we might be multiplying or dividing by $0$.  We also have casually accepted what the algebra seems to say, without doing a reality check.  

Suppose that $p=0$. Then $np+p-1$ is an integer, namely $-1$. But whatever $n$ is, there is a single mode, namely $k=0$. In all other situations where $np+p-1$ is an integer, the $k$ we have identified is non-negative.

However, suppose that $p=1$. Again, $np+p-1$ is an integer, and again there is no double mode. The largest $a_k$ occurs at one place only, namely $k=n$, since $np+p$ is in this case beyond our range.

That completes the analysis when $np+p-1$ is an integer. When it is not, the analysis is simple. There is a single mode, at $\lfloor np+p\rfloor$.

TOP

返回列表 回复 发帖