Distribució binomial
Author: Pep Bujosa

X

Probabilitat

Simulació

Freq.Abs.

Total Tirades

Freq.Rel.

Gràfic distribució

Gràfic simulació

Probabilitats

Taula

Una nova simulació

p = 0.8 (slider from 0 to 1, step 0.1)
n = 8 (slider from 1 to 12, step 1)
A2 = 0
A3 = If(A2 < n, A2 + 1)
A4 = If(A3 < n, A3 + 1)
A5 = If(A4 < n, A4 + 1)
A6 = If(A5 < n, A5 + 1)
A7 = If(A6 < n, A6 + 1)
A8 = If(A7 < n, A7 + 1)
A9 = If(A8 < n, A8 + 1)
A10 = If(A9 < n, A9 + 1)
A11 = If(A10 < n, A10 + 1)
A12 = If(A11 < n, A11 + 1)
A13 = If(A12 < n, A12 + 1)
A14 = If(A13 < n, A13 + 1)
B3 = If(n ≥ A3, n! / (A3! * (n - A3)!) * p^(A3) * (1 - p)^(n - A3))
B4 = If(n ≥ A4, n! / (A4! * (n - A4)!) * p^(A4) * (1 - p)^(n - A4))
B5 = If(n ≥ A5, n! / (A5! * (n - A5)!) * p^(A5) * (1 - p)^(n - A5))
B6 = If(n ≥ A6, n! / (A6! * (n - A6)!) * p^(A6) * (1 - p)^(n - A6))
B7 = If(n ≥ A7, n! / (A7! * (n - A7)!) * p^(A7) * (1 - p)^(n - A7))
B8 = If(n ≥ A8, n! / (A8! * (n - A8)!) * p^(A8) * (1 - p)^(n - A8))
B9 = If(n ≥ A9, n! / (A9! * (n - A9)!) * p^(A9) * (1 - p)^(n - A9))
B10 = If(n ≥ A10, n! / (A10! * (n - A10)!) * p^(A10) * (1 - p)^(n - A10))
B11 = If(n ≥ A11, n! / (A11! * (n - A11)!) * p^(A11) * (1 - p)^(n - A11))
B12 = If(n ≥ A12, n! / (A12! * (n - A12)!) * p^(A12) * (1 - p)^(n - A12))
B13 = If(n ≥ A13, n! / (A13! * (n - A13)!) * p^(A13) * (1 - p)^(n - A13))
B14 = If(n ≥ A14, n! / (A14! * (n - A14)!) * p^(A14) * (1 - p)^(n - A14))
B2 = If(n ≥ A2, n! / (A2! * (n - A2)!) * p^(A2) * (1 - p)^(n - A2))
Si[A2 ≤ n, B2, "No"] = If(A2 ≤ n, " " + B2, "No")
llista2 = Sequence(Text[Object["B" + (i)], (Object["A" + (i)] - 0.25, Object["B" + (i)] + 0.015)], i, 2, n + 2)
C2 = RandomBinomial(n, p)
C3 = RandomBinomial(n, p)
C4 = RandomBinomial(n, p)
C5 = RandomBinomial(n, p)
C6 = RandomBinomial(n, p)
C7 = RandomBinomial(n, p)
C8 = RandomBinomial(n, p)
C9 = RandomBinomial(n, p)
C10 = RandomBinomial(n, p)
C11 = RandomBinomial(n, p)
C12 = RandomBinomial(n, p)
C13 = RandomBinomial(n, p)
C14 = RandomBinomial(n, p)
C15 = RandomBinomial(n, p)
C16 = RandomBinomial(n, p)
C17 = RandomBinomial(n, p)
C18 = RandomBinomial(n, p)
C19 = RandomBinomial(n, p)
C20 = RandomBinomial(n, p)
C21 = RandomBinomial(n, p)
C22 = RandomBinomial(n, p)
C23 = RandomBinomial(n, p)
C24 = RandomBinomial(n, p)
C25 = RandomBinomial(n, p)
C26 = RandomBinomial(n, p)
C27 = RandomBinomial(n, p)
C28 = RandomBinomial(n, p)
C29 = RandomBinomial(n, p)
C30 = RandomBinomial(n, p)
C31 = RandomBinomial(n, p)
C32 = RandomBinomial(n, p)
C33 = RandomBinomial(n, p)
C34 = RandomBinomial(n, p)
C35 = RandomBinomial(n, p)
C36 = RandomBinomial(n, p)
C37 = RandomBinomial(n, p)
C38 = RandomBinomial(n, p)
C39 = RandomBinomial(n, p)
C40 = RandomBinomial(n, p)
C41 = RandomBinomial(n, p)
C42 = RandomBinomial(n, p)
C43 = RandomBinomial(n, p)
C44 = RandomBinomial(n, p)
C45 = RandomBinomial(n, p)
C46 = RandomBinomial(n, p)
C47 = RandomBinomial(n, p)
C48 = RandomBinomial(n, p)
C49 = RandomBinomial(n, p)
C50 = RandomBinomial(n, p)
C51 = RandomBinomial(n, p)
C52 = RandomBinomial(n, p)
C53 = RandomBinomial(n, p)
C54 = RandomBinomial(n, p)
C55 = RandomBinomial(n, p)
C56 = RandomBinomial(n, p)
C57 = RandomBinomial(n, p)
C58 = RandomBinomial(n, p)
C59 = RandomBinomial(n, p)
C60 = RandomBinomial(n, p)
C61 = RandomBinomial(n, p)
C62 = RandomBinomial(n, p)
C63 = RandomBinomial(n, p)
C64 = RandomBinomial(n, p)
C65 = RandomBinomial(n, p)
C66 = RandomBinomial(n, p)
C67 = RandomBinomial(n, p)
C68 = RandomBinomial(n, p)
C69 = RandomBinomial(n, p)
C70 = RandomBinomial(n, p)
C71 = RandomBinomial(n, p)
C72 = RandomBinomial(n, p)
C73 = RandomBinomial(n, p)
C74 = RandomBinomial(n, p)
C75 = RandomBinomial(n, p)
C76 = RandomBinomial(n, p)
C77 = RandomBinomial(n, p)
C78 = RandomBinomial(n, p)
C79 = RandomBinomial(n, p)
C80 = RandomBinomial(n, p)
C81 = RandomBinomial(n, p)
C82 = RandomBinomial(n, p)
C83 = RandomBinomial(n, p)
C84 = RandomBinomial(n, p)
C85 = RandomBinomial(n, p)
C86 = RandomBinomial(n, p)
C87 = RandomBinomial(n, p)
C88 = RandomBinomial(n, p)
C89 = RandomBinomial(n, p)
C90 = RandomBinomial(n, p)
C91 = RandomBinomial(n, p)
C92 = RandomBinomial(n, p)
C93 = RandomBinomial(n, p)
C94 = RandomBinomial(n, p)
C95 = RandomBinomial(n, p)
C96 = RandomBinomial(n, p)
C97 = RandomBinomial(n, p)
C98 = RandomBinomial(n, p)
C99 = RandomBinomial(n, p)
C100 = RandomBinomial(n, p)
C101 = RandomBinomial(n, p)
C102 = RandomBinomial(n, p)
C103 = RandomBinomial(n, p)
C104 = RandomBinomial(n, p)
C105 = RandomBinomial(n, p)
C106 = RandomBinomial(n, p)
C107 = RandomBinomial(n, p)
C108 = RandomBinomial(n, p)
C109 = RandomBinomial(n, p)
C110 = RandomBinomial(n, p)
C111 = RandomBinomial(n, p)
C112 = RandomBinomial(n, p)
C113 = RandomBinomial(n, p)
C114 = RandomBinomial(n, p)
C115 = RandomBinomial(n, p)
C116 = RandomBinomial(n, p)
C117 = RandomBinomial(n, p)
C118 = RandomBinomial(n, p)
C119 = RandomBinomial(n, p)
C120 = RandomBinomial(n, p)
C121 = RandomBinomial(n, p)
C122 = RandomBinomial(n, p)
C123 = RandomBinomial(n, p)
C124 = RandomBinomial(n, p)
C125 = RandomBinomial(n, p)
C126 = RandomBinomial(n, p)
C127 = RandomBinomial(n, p)
C128 = RandomBinomial(n, p)
C129 = RandomBinomial(n, p)
C130 = RandomBinomial(n, p)
C131 = RandomBinomial(n, p)
C132 = RandomBinomial(n, p)
C133 = RandomBinomial(n, p)
C134 = RandomBinomial(n, p)
C135 = RandomBinomial(n, p)
C136 = RandomBinomial(n, p)
C137 = RandomBinomial(n, p)
C138 = RandomBinomial(n, p)
C139 = RandomBinomial(n, p)
C140 = RandomBinomial(n, p)
C141 = RandomBinomial(n, p)
C142 = RandomBinomial(n, p)
C143 = RandomBinomial(n, p)
C144 = RandomBinomial(n, p)
C145 = RandomBinomial(n, p)
C146 = RandomBinomial(n, p)
C147 = RandomBinomial(n, p)
C148 = RandomBinomial(n, p)
C149 = RandomBinomial(n, p)
C150 = RandomBinomial(n, p)
C151 = RandomBinomial(n, p)
C152 = RandomBinomial(n, p)
C153 = RandomBinomial(n, p)
C154 = RandomBinomial(n, p)
C155 = RandomBinomial(n, p)
C156 = RandomBinomial(n, p)
C157 = RandomBinomial(n, p)
C158 = RandomBinomial(n, p)
C159 = RandomBinomial(n, p)
C160 = RandomBinomial(n, p)
C161 = RandomBinomial(n, p)
C162 = RandomBinomial(n, p)
C163 = RandomBinomial(n, p)
C164 = RandomBinomial(n, p)
C165 = RandomBinomial(n, p)
C166 = RandomBinomial(n, p)
C167 = RandomBinomial(n, p)
C168 = RandomBinomial(n, p)
C169 = RandomBinomial(n, p)
C170 = RandomBinomial(n, p)
C171 = RandomBinomial(n, p)
C172 = RandomBinomial(n, p)
C173 = RandomBinomial(n, p)
C174 = RandomBinomial(n, p)
C175 = RandomBinomial(n, p)
C176 = RandomBinomial(n, p)
C177 = RandomBinomial(n, p)
C178 = RandomBinomial(n, p)
C179 = RandomBinomial(n, p)
C180 = RandomBinomial(n, p)
C181 = RandomBinomial(n, p)
C182 = RandomBinomial(n, p)
C183 = RandomBinomial(n, p)
C184 = RandomBinomial(n, p)
C185 = RandomBinomial(n, p)
C186 = RandomBinomial(n, p)
C187 = RandomBinomial(n, p)
C188 = RandomBinomial(n, p)
C189 = RandomBinomial(n, p)
C190 = RandomBinomial(n, p)
C191 = RandomBinomial(n, p)
C192 = RandomBinomial(n, p)
C193 = RandomBinomial(n, p)
C194 = RandomBinomial(n, p)
C195 = RandomBinomial(n, p)
C196 = RandomBinomial(n, p)
C197 = RandomBinomial(n, p)
C198 = RandomBinomial(n, p)
C199 = RandomBinomial(n, p)
C200 = RandomBinomial(n, p)
C201 = RandomBinomial(n, p)
D2 = If(A2 ≤ n, CountIf[x ≟ A2, C$2:C$201])
D3 = If(A3 ≤ n, CountIf[x ≟ A3, C$2:C$201])
D4 = If(A4 ≤ n, CountIf[x ≟ A4, C$2:C$201])
D5 = If(A5 ≤ n, CountIf[x ≟ A5, C$2:C$201])
D6 = If(A6 ≤ n, CountIf[x ≟ A6, C$2:C$201])
D7 = If(A7 ≤ n, CountIf[x ≟ A7, C$2:C$201])
D8 = If(A8 ≤ n, CountIf[x ≟ A8, C$2:C$201])
D9 = If(A9 ≤ n, CountIf[x ≟ A9, C$2:C$201])
D10 = If(A10 ≤ n, CountIf[x ≟ A10, C$2:C$201])
D11 = If(A11 ≤ n, CountIf[x ≟ A11, C$2:C$201])
D12 = If(A12 ≤ n, CountIf[x ≟ A12, C$2:C$201])
D13 = If(A13 ≤ n, CountIf[x ≟ A13, C$2:C$201])
D14 = If(A14 ≤ n, CountIf[x ≟ A14, C$2:C$201])
D16 = 200
E2 = If(A2 ≤ n, D2 / D$16)
E3 = If(A3 ≤ n, D3 / D$16)
E4 = If(A4 ≤ n, D4 / D$16)
E5 = If(A5 ≤ n, D5 / D$16)
E6 = If(A6 ≤ n, D6 / D$16)
E7 = If(A7 ≤ n, D7 / D$16)
E8 = If(A8 ≤ n, D8 / D$16)
E9 = If(A9 ≤ n, D9 / D$16)
E10 = If(A10 ≤ n, D10 / D$16)
E11 = If(A11 ≤ n, D11 / D$16)
E12 = If(A12 ≤ n, D12 / D$16)
E13 = If(A13 ≤ n, D13 / D$16)
E14 = If(A14 ≤ n, D14 / D$16)
b = BarChart(RemoveUndefined[A2:A14], RemoveUndefined[E2:E14], 0.8)
a = BarChart(RemoveUndefined[A2:A14], RemoveUndefined[B2:B14], 0.5)
text1 = TableText({RemoveUndefined[A1:A14], RemoveUndefined[B1:B14], RemoveUndefined[E1:E14]}, "vc")
text2: "Distribució Binomial  B(" + n + "," + p + ")"
c = true
d = true
e = true
f = true