<p><b>伯努利分布</b>（英語：<span lang="en"><i>Bernoulli distribution</i></span>），又名<b>兩點分布</b>或者<b>0-1分布</b>，是一個離散型機率分布，為紀念瑞士科學家雅各布·伯努利而命名。若伯努利試驗成功，則伯努利隨機變數取值為1。若伯努利試驗失敗，則伯努利隨機變數取值為0。記其成功機率為<span><span><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p(0\leq p\leq 1)}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <mi>p</mi>
        <mo stretchy="false">(</mo>
        <mn>0</mn>
        <mo>≤<!-- ≤ --></mo>
        <mi>p</mi>
        <mo>≤<!-- ≤ --></mo>
        <mn>1</mn>
        <mo stretchy="false">)</mo>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle p(0\leq p\leq 1)}</annotation>
  </semantics></math></span></span>，失敗機率為<span><span><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=1-p}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <mi>q</mi>
        <mo>=</mo>
        <mn>1</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle q=1-p}</annotation>
  </semantics></math></span></span>。則
</p>
<ul><li>其機率質量函數為：
<ul><li><dl><dd><span><span><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle f_{X}(x)=p^{x}(1-p)^{1-x}=\left\{{\begin{matrix}p&{\mbox{if }}x=1,\\q\ &{\mbox{if }}x=0.\\\end{matrix}}\right.}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <msub>
          <mi>f</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>X</mi>
          </mrow>
        </msub>
        <mo stretchy="false">(</mo>
        <mi>x</mi>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <msup>
          <mi>p</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>x</mi>
          </mrow>
        </msup>
        <mo stretchy="false">(</mo>
        <mn>1</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
        <msup>
          <mo stretchy="false">)</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>1</mn>
            <mo>−<!-- − --></mo>
            <mi>x</mi>
          </mrow>
        </msup>
        <mo>=</mo>
        <mrow>
          <mo>{</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mtable rowspacing="4pt" columnspacing="1em">
              <mtr>
                <mtd>
                  <mi>p</mi>
                </mtd>
                <mtd>
                  <mrow class="MJX-TeXAtom-ORD">
                    <mstyle displaystyle="false" scriptlevel="0">
                      <mtext>if </mtext>
                    </mstyle>
                  </mrow>
                  <mi>x</mi>
                  <mo>=</mo>
                  <mn>1</mn>
                  <mo>,</mo>
                </mtd>
              </mtr>
              <mtr>
                <mtd>
                  <mi>q</mi>
                  <mtext> </mtext>
                </mtd>
                <mtd>
                  <mrow class="MJX-TeXAtom-ORD">
                    <mstyle displaystyle="false" scriptlevel="0">
                      <mtext>if </mtext>
                    </mstyle>
                  </mrow>
                  <mi>x</mi>
                  <mo>=</mo>
                  <mn>0.</mn>
                </mtd>
              </mtr>
            </mtable>
          </mrow>
          <mo fence="true" stretchy="true" symmetric="true"></mo>
        </mrow>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle f_{X}(x)=p^{x}(1-p)^{1-x}=\left\{{\begin{matrix}p&amp;{\mbox{if }}x=1,\\q\ &amp;{\mbox{if }}x=0.\\\end{matrix}}\right.}</annotation>
  </semantics></math></span></span></dd></dl></li></ul></li>
<li>其期望值為：
<ul><li><dl><dd><span><span><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {E} [X]=\sum _{i=0}^{1}x_{i}f_{X}(x)=0+p=p}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <mi mathvariant="normal">E</mi>
        <mo>⁡<!-- ⁡ --></mo>
        <mo stretchy="false">[</mo>
        <mi>X</mi>
        <mo stretchy="false">]</mo>
        <mo>=</mo>
        <munderover>
          <mo>∑<!-- ∑ --></mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>i</mi>
            <mo>=</mo>
            <mn>0</mn>
          </mrow>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>1</mn>
          </mrow>
        </munderover>
        <msub>
          <mi>x</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>i</mi>
          </mrow>
        </msub>
        <msub>
          <mi>f</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>X</mi>
          </mrow>
        </msub>
        <mo stretchy="false">(</mo>
        <mi>x</mi>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <mn>0</mn>
        <mo>+</mo>
        <mi>p</mi>
        <mo>=</mo>
        <mi>p</mi>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle \operatorname {E} [X]=\sum _{i=0}^{1}x_{i}f_{X}(x)=0+p=p}</annotation>
  </semantics></math></span></span></dd></dl></li></ul></li>
<li>其變異數為：
<ul><li><dl><dd><span><span><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {Var} [X]=\sum _{i=0}^{1}(x_{i}-\operatorname {E} [X])^{2}f_{X}(x)=(0-p)^{2}(1-p)+(1-p)^{2}p=p(1-p)=pq}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <mi>Var</mi>
        <mo>⁡<!-- ⁡ --></mo>
        <mo stretchy="false">[</mo>
        <mi>X</mi>
        <mo stretchy="false">]</mo>
        <mo>=</mo>
        <munderover>
          <mo>∑<!-- ∑ --></mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>i</mi>
            <mo>=</mo>
            <mn>0</mn>
          </mrow>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>1</mn>
          </mrow>
        </munderover>
        <mo stretchy="false">(</mo>
        <msub>
          <mi>x</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>i</mi>
          </mrow>
        </msub>
        <mo>−<!-- − --></mo>
        <mi mathvariant="normal">E</mi>
        <mo>⁡<!-- ⁡ --></mo>
        <mo stretchy="false">[</mo>
        <mi>X</mi>
        <mo stretchy="false">]</mo>
        <msup>
          <mo stretchy="false">)</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msup>
        <msub>
          <mi>f</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>X</mi>
          </mrow>
        </msub>
        <mo stretchy="false">(</mo>
        <mi>x</mi>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <mo stretchy="false">(</mo>
        <mn>0</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
        <msup>
          <mo stretchy="false">)</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msup>
        <mo stretchy="false">(</mo>
        <mn>1</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
        <mo stretchy="false">)</mo>
        <mo>+</mo>
        <mo stretchy="false">(</mo>
        <mn>1</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
        <msup>
          <mo stretchy="false">)</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msup>
        <mi>p</mi>
        <mo>=</mo>
        <mi>p</mi>
        <mo stretchy="false">(</mo>
        <mn>1</mn>
        <mo>−<!-- − --></mo>
        <mi>p</mi>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <mi>p</mi>
        <mi>q</mi>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle \operatorname {Var} [X]=\sum _{i=0}^{1}(x_{i}-\operatorname {E} [X])^{2}f_{X}(x)=(0-p)^{2}(1-p)+(1-p)^{2}p=p(1-p)=pq}</annotation>
  </semantics></math></span></span></dd></dl></li></ul></li></ul><h2><span id=".E5.8F.82.E8.80.83.E6.96.87.E7.8C.AE"></span><span id="参考文献">參考文獻</span></h2>

<h2><span id=".E5.8F.83.E8.A6.8B"></span><span id="參見">參見</span></h2>

<ul><li>機率論</li>
<li>伯努利試驗</li>
<li>伯努利過程</li>
<li>機率分布</li></ul>
<!-- 
NewPP limit report
Parsed by mw2396
Cached time: 20230505001809
Cache expiry: 1814400
Reduced expiry: false
Complications: [vary‐revision‐sha1]
CPU time usage: 0.638 seconds
Real time usage: 0.870 seconds
Preprocessor visited node count: 5869/1000000
Post‐expand include size: 559266/2097152 bytes
Template argument size: 11524/2097152 bytes
Highest expansion depth: 10/100
Expensive parser function count: 148/500
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 1711/5000000 bytes
Lua time usage: 0.333/10.000 seconds
Lua memory usage: 32341504/52428800 bytes
Number of Wikibase entities loaded: 0/400
--><!--
Transclusion expansion time report (%,ms,calls,template)
100.00%  618.230      1 -total
 87.07%  538.287      5 Template:Navbox
 51.40%  317.747      1 Template:概率分布类型列表
 43.59%  269.497    146 Template:Tsl
 15.46%   95.592      1 Template:Lang-en
  8.37%   51.743      1 Template:NoteTA
  7.29%   45.091      1 Template:常见一元概率分布
  7.27%   44.955      1 Template:Reflist
  6.45%   39.872      1 Template:Cite_book
  5.14%   31.775      1 Template:機率分佈
-->
**伯努利分布**（英語：_Bernoulli distribution_），又名**兩點分布**或者 **0-1 分布**，是一個離散型機率分布，為紀念瑞士科學家雅各布・伯努利而命名。若伯努利試驗成功，則伯努利隨機變數取值為 1。若伯努利試驗失敗，則伯努利隨機變數取值為 0。記其成功機率為 $p(0\leq p\leq 1)$ ，失敗機率為 $q=1-p$ 。則

* 其機率質量函數為：
   * : $f_{X}(x)=p^{x}(1-p)^{1-x}=\left\{{\begin{matrix}p&{\mbox{if }}x=1,\\q\ &{\mbox{if }}x=0.\\\end{matrix}}\right.$
* 其期望值為：
   * : $\operatorname {E} [X]=\sum _{i=0}^{1}x_{i}f_{X}(x)=0+p=p$
* 其變異數為：
   * : $\operatorname {Var} [X]=\sum _{i=0}^{1}(x_{i}-\operatorname {E} [X])^{2}f_{X}(x)=(0-p)^{2}(1-p)+(1-p)^{2}p=p(1-p)=pq$

## 參考文獻

## 參見

* 機率論
* 伯努利試驗
* 伯努利過程
* 機率分布
0-1分布