<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tobias Website (Einträge über soccer)</title><link>https://tobias1.win/</link><description></description><atom:link href="https://tobias1.win/categories/soccer.xml" rel="self" type="application/rss+xml"></atom:link><language>de</language><copyright>Contents © 2026 Tobias </copyright><lastBuildDate>Thu, 20 Aug 2026 22:17:07 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Poisson-Rechner für Fußball-Ergebnisse</title><link>https://tobias1.win/posts/12.html</link><dc:creator>Tobias</dc:creator><description>&lt;p&gt;Geben Sie die Quoten und die erwartete Toranzahl ein. Das Tool berechnet die exakten Ergebnisse sowie die
    addierten Gesamtwahrscheinlichkeiten.&lt;/p&gt;
  &lt;table style="width: 100%;"&gt;
    &lt;tr&gt;
      &lt;th style="width: 20%;"&gt;Unentschieden möglich?&lt;/th&gt;
      &lt;th style="width: 20%;"&gt;Quote A (1):&lt;/th&gt;
      &lt;th style="width: 20%;"&gt;Quote UE (X):&lt;/th&gt;
      &lt;th style="width: 20%;"&gt;Quote B (2):&lt;/th&gt;
      &lt;th style="width: 20%;"&gt;Erwartete Gesamttore:&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;select id="drawStatus" onchange="calculateFromQuotes()"&gt;
          &lt;option value="yes" selected&gt;Ja (Reguläres Spiel)&lt;/option&gt;
          &lt;option value="no"&gt;Nein (K.o.-Spiel)&lt;/option&gt;
        &lt;/select&gt;
      &lt;/td&gt;
      &lt;td&gt;&lt;input type="number" id="quoteHome" step="0.01" value="3.50" min="1.01" oninput="calculateFromQuotes()"&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="number" id="quoteDraw" step="0.01" value="4.00" min="1.01" oninput="calculateFromQuotes()"&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="number" id="quoteAway" step="0.01" value="1.95" min="1.01" oninput="calculateFromQuotes()"&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;select id="totalGoals" onchange="calculateFromQuotes()"&gt;
          &lt;option value="1.5"&gt;1.5 Tore (Mimimi)&lt;/option&gt;
          &lt;option value="2.0"&gt;2.0 Tore (Defensiv)&lt;/option&gt;
          &lt;option value="2.5" selected&gt;2.5 Tore (Schnitt)&lt;/option&gt;
          &lt;option value="3.0"&gt;3.0 Tore (Leicht offensiv)&lt;/option&gt;
          &lt;option value="3.5"&gt;3.5 Tore (Offensiv)&lt;/option&gt;
          &lt;option value="4.0"&gt;4.0 Tore (Torreich)&lt;/option&gt;
          &lt;option value="5.0"&gt;5.0 Tore (Sehr torreich)&lt;/option&gt;
          &lt;option value="6.0"&gt;6.0 Tore (Außergewöhlich)&lt;/option&gt;
        &lt;/select&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;

  &lt;br&gt;

  &lt;p&gt;Berechnete Zwischenwerte:&lt;/p&gt;
  &lt;table style="width: 100%;"&gt;
    &lt;tr&gt;
      &lt;th style="width: 25%;"&gt;&lt;/th&gt;
      &lt;th style="width: 25%;"&gt;Berein. Buchmacherwahrs.:&lt;/th&gt;
      &lt;th style="width: 25%;"&gt;Torerwartung (λ):&lt;/th&gt;
      &lt;th style="width: 25%;"&gt;Poisson-Zusammenfassung:&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1:&lt;/td&gt;
      &lt;td&gt;&lt;span id="fairHomeProb"&gt;0&lt;/span&gt; %&lt;/td&gt;
      &lt;td&gt;&lt;span id="calcHomeLambda"&gt;0&lt;/span&gt; Tore&lt;/td&gt;
      &lt;td&gt;&lt;span id="sumHome"&gt;0.00&lt;/span&gt; %&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;X:&lt;/td&gt;
      &lt;td&gt;&lt;span id="fairDrawProb"&gt;0&lt;/span&gt; %&lt;/td&gt;
      &lt;td&gt;-&lt;/td&gt;
      &lt;td&gt;&lt;span id="sumDraw"&gt;0.00&lt;/span&gt; %&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2:&lt;/td&gt;
      &lt;td&gt;&lt;span id="fairAwayProb"&gt;0&lt;/span&gt; %&lt;/td&gt;
      &lt;td&gt;&lt;span id="calcAwayLambda"&gt;0&lt;/span&gt; Tore&lt;/td&gt;
      &lt;td&gt;&lt;span id="sumAway"&gt;0.00&lt;/span&gt; %&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;

  &lt;br&gt;

  &lt;p&gt;Wahrscheinlichkeiten für exakte Ergebnisse (in %):&lt;/p&gt;
  &lt;table id="resultTable" style="width: 100%;"&gt;
    &lt;!-- Tabelle wird per JavaScript befüllt --&gt;
  &lt;/table&gt;

  &lt;script&gt;
    function factorial(n) {
      if (n == 0 || n == 1) return 1;
      let result = 1;
      for (let i = 2; i &lt;= n; i++) result *= i;
      return result;
    }

    function poisson(x, lambda) {
      return (Math.pow(lambda, x) * Math.exp(-lambda)) / factorial(x);
    }

    function calculateFromQuotes() {
      // STEUERUNGS-VARIABLE (6 bedeutet: Ergebnisse von 0:0 bis 6:6)
      const MAX_GOALS = 6;

      // 1. Eingabewerte aus dem HTML-Formular auslesen
      const drawStatus = document.getElementById('drawStatus').value;
      const qHome = parseFloat(document.getElementById('quoteHome').value);
      const qAway = parseFloat(document.getElementById('quoteAway').value);
      const totalGoalsExp = parseFloat(document.getElementById('totalGoals').value);

      // Unentschieden-Quote nur prüfen, wenn das Remis aktiv ist
      let qDraw = 1;
      if (drawStatus == 'yes') {
        qDraw = parseFloat(document.getElementById('quoteDraw').value);
        if (isNaN(qDraw) || qDraw &lt;= 1) {
          return;
        }
      }

      // Validierung der Hauptquoten
      if (isNaN(qHome) || isNaN(qAway) || qHome &lt;= 1 || qAway &lt;= 1) {
        return;
      }

      // 2. Implizierte Wahrscheinlichkeiten aus den Quoten ermitteln
      const rawHome = 100 / qHome;
      const rawAway = 100 / qAway;
      const rawDraw = (drawStatus == 'yes') ? (100 / qDraw) : 0;
      const totalRaw = rawHome + rawAway + rawDraw; // Summe enthält die Buchmachermarge

      // 3. Marge herausrechnen, um die fairen Wahrscheinlichkeiten zu erhalten
      const fairHome = (rawHome / totalRaw) * 100;
      const fairAway = (rawAway / totalRaw) * 100;
      const fairDraw = (drawStatus == 'yes') ? ((rawDraw / totalRaw) * 100) : 0;

      // Zwischenwerte in der Benutzeroberfläche (UI) anzeigen
      document.getElementById('fairHomeProb').innerText = fairHome.toFixed(1);
      document.getElementById('fairAwayProb').innerText = fairAway.toFixed(1);
      if (drawStatus == 'yes') {
        document.getElementById('fairDrawProb').innerText = fairDraw.toFixed(1);
      }

      // 4. Gesamttorerwartung anhand des Kräfteverhältnisses aufteilen (Lambda)
      const shareHome = fairHome / (fairHome + fairAway);
      const homeLambda = totalGoalsExp * shareHome;
      const awayLambda = totalGoalsExp * (1 - shareHome);

      // Berechnete Lambdas in der UI anzeigen
      document.getElementById('calcHomeLambda').innerText = homeLambda.toFixed(2);
      document.getElementById('calcAwayLambda').innerText = awayLambda.toFixed(2);

      // Zähler-Variablen für die 1X2-Gesamtsummen zurücksetzen
      let totalHomeWinProb = 0;
      let totalDrawProb = 0;
      let totalAwayWinProb = 0;

      // 5. Ergebnistabelle im HTML vorbereiten und leeren
      const table = document.getElementById('resultTable');
      table.innerHTML = '';

      // Tabellenkopf (Spaltenbeschriftung von 0 bis MAX_GOALS) generieren
      let headerRow = '&lt;tr&gt;&lt;th style="width: 12.5%;"&gt;A \\ B&lt;/th&gt;';
      for (let awayGoals = 0; awayGoals &lt;= MAX_GOALS; awayGoals++) {
        headerRow += '&lt;th style="width: 12.5%;"&gt;' + awayGoals + ' Tor(e)&lt;/th&gt;';
      }
      headerRow += '&lt;/tr&gt;';
      table.innerHTML += headerRow;

      // Hilfsvariablen zur Ermittlung des statistisch wahrscheinlichsten Ergebnisses
      let highestProb = 0;
      let bestHome = 0;
      let bestAway = 0;
      let matrix = [];

      // 6. Poisson-Matrix berechnen (Verschachtelte Schleife für Heim- und Auswärtstore)
      for (let homeGoals = 0; homeGoals &lt;= MAX_GOALS; homeGoals++) {
        matrix[homeGoals] = [];
        let pHome = poisson(homeGoals, homeLambda);

        for (let awayGoals = 0; awayGoals &lt;= MAX_GOALS; awayGoals++) {
          // Wenn Remis deaktiviert ist, Gleichstände überspringen
          if (drawStatus == 'no' &amp;&amp; homeGoals == awayGoals) {
            matrix[homeGoals][awayGoals] = 0;
            continue;
          }

          let pAway = poisson(awayGoals, awayLambda);
          let combinedProb = pHome * pAway * 100; // Kombinierte Wahrscheinlichkeit in %

          matrix[homeGoals][awayGoals] = combinedProb;

          // Einzelergebnis den globalen Töpfen für Heimsieg, Remis oder Auswärtssieg zuweisen
          if (homeGoals &gt; awayGoals) {
            totalHomeWinProb += combinedProb;
          } else if (homeGoals == awayGoals) {
            totalDrawProb += combinedProb;
          } else {
            totalAwayWinProb += combinedProb;
          }

          // Prüfen, ob dies das bisher wahrscheinlichste Ergebnis ist
          if (combinedProb &gt; highestProb) {
            highestProb = combinedProb;
            bestHome = homeGoals;
            bestAway = awayGoals;
          }
        }
      }

      // 7. Die addierten 1X2-Gesamtwahrscheinlichkeiten in das HTML schreiben
      document.getElementById('sumHome').innerText = totalHomeWinProb.toFixed(2);
      document.getElementById('sumDraw').innerText = totalDrawProb.toFixed(2);
      document.getElementById('sumAway').innerText = totalAwayWinProb.toFixed(2);

      // 8. Die berechneten Daten zeilenweise in die HTML-Tabelle einfügen
      for (let homeGoals = 0; homeGoals &lt;= MAX_GOALS; homeGoals++) {
        let row = '&lt;tr&gt;&lt;td&gt;' + homeGoals + ' Tor(e)&lt;/td&gt;';
        for (let awayGoals = 0; awayGoals &lt;= MAX_GOALS; awayGoals++) {

          // Ausgegrautes Feld für Unentschieden anzeigen, falls Remis deaktiviert ist
          if (drawStatus == 'no' &amp;&amp; homeGoals == awayGoals) {
            row += '&lt;td&gt;-&lt;/td&gt;';
            continue;
          }

          let prob = matrix[homeGoals][awayGoals].toFixed(2);

          // Das mathematisch wahrscheinlichste Ergebnis grün hervorheben
          if (homeGoals == bestHome &amp;&amp; awayGoals == bestAway) {
            row += '&lt;td style="background-color: #00D100;"&gt;' + prob + ' % (' + homeGoals + ':' + awayGoals + ')&lt;/td&gt;';
          } else {
            row += '&lt;td&gt;' + prob + ' %&lt;/td&gt;';
          }
        }
        row += '&lt;/tr&gt;';
        table.innerHTML += row;
      }
    }

    window.onload = calculateFromQuotes;
  &lt;/script&gt;</description><category>soccer</category><category>tool</category><guid>https://tobias1.win/posts/12.html</guid><pubDate>Tue, 16 Jun 2026 05:00:00 GMT</pubDate></item></channel></rss>