Abstract

Wenn Sie aus einem vollständigen Kartensatz von 52 Spielkarten 7 Karten ohne Zurücklegen ziehen, wie hoch ist die Wahrscheinlichkeit, dass Sie dann 3 Asse in der Hand halten?

Die Antwort lautet: etwa 0,58%

Wahrscheinlichkeiten

Die genaue Formel für die Wahrscheinlichkeit ohne Zurücklegen ist für Excel 365 oder Excel 2021

=WENNFEHLER(KOMBINATIONEN(Elements_Drawn;SEQUENZ(1;Elements_Same + 1;0;1)) * (Elements_Same/Elements_Total)^SEQUENZ(1;Elements_Same + 1;0;1) * WENNFEHLER((1 - Elements_Same/Elements_Total)^(Elements_Drawn-SEQUENZ(1;Elements_Same + 1;0;1));1);0)

Mit Zurücklegen lautet sie

=WENNFEHLER(KOMBINATIONEN(Elements_Same;SEQUENZ(1;Elements_Same + 1;0;1))*KOMBINATIONEN(Elements_Total - Elements_Same;Elements_Drawn-SEQUENZ(1;Elements_Same + 1;0;1))/KOMBINATIONEN(Elements_Total;Elements_Drawn); 0)

Dabei wurden folgende Namen definiert: Wahrscheinlichkeiten_Namensmanager

Näherungsweise können Sie diese Wahrscheinlichkeiten auch mit einer Monte Carlo Simulation ermitteln:

Appendix – Programmcode monte

Bitte den Haftungsausschluss im Impressum beachten.

Option Explicit

Function monte(bWithReplacement As Boolean, _
    Optional runs As Long = 100000) As Variant
'Source (EN): https://www.sulprobil.com/likelihoods_en/
'Source (DE): https://www.bplumhoff.de/wahrscheinlichkeiten_de/
'(C) (P) by Bernd Plumhoff  27-Oct-2022 PB V0.2
Dim i As Long, j As Long, n As Long
Dim lAces As Long, lCards As Long
Dim lCardsDrawn As Long, lCardsSame As Long, lCardsTotal As Long
Dim r(1 To 5) As Variant
With Application.WorksheetFunction
lCardsTotal = Range("Elements_Total")
lCardsSame = Range("Elements_Same")
lCardsDrawn = Range("Elements_Drawn")
Randomize
For i = 1 To runs
    n = 0
    For j = 1 To lCardsDrawn
        If bWithReplacement Then
            lCards = lCardsTotal
            lAces = lCardsSame
        Else
            lCards = lCardsTotal + 1 - j
            lAces = lCardsSame - n
        End If
        If .RandBetween(1, lCards) < 1 + lAces Then
            n = n + 1
            If n = lCardsSame Then Exit For
        End If
    Next j
    r(1 + n) = r(1 + n) + 1
Next i
For i = 1 To lCardsSame + 1: r(i) = r(i) / runs: Next i
monte = r
End With
End Function

Download

Bitte den Haftungsausschluss im Impressum beachten.

Wahrscheinlichkeiten_Ziehen_mit_oder_ohne_Zuruecklegen.xlsm [22 KB Excel Datei, ohne jegliche Gewährleistung]