r/LosAngelesRams 1d ago

The Rams have a 29% chance of clinching the division this week

Suffering Giants fan here who has hopped on the Rams bandwagon the past couple of years since my friend is a fan!

This post describes what it takes for the Rams to clinch the division this week. I was curious about the chances of that occurring, so I wrote a quick script to simulate it and the results are ~29%. I sourced the win probabilities from here. Good luck!

from random import random


LAR_WIN_PROB = 0.726
OTHER_WIN_PROBS = [0.618, 0.640, 0.791, 0.375, 0.50, 0.274]
NUM_SIMULATIONS = 1000000

num_clinches = 0

for _ in range(NUM_SIMULATIONS):
  rams_win = random() <= LAR_WIN_PROB

  if not rams_win:
    continue

  num_other_wins = 0

  for other_win_prob in OTHER_WIN_PROBS:
    other_win = random() <= other_win_prob

    if other_win:
      num_other_wins += 1

    if num_other_wins == 4:
      num_clinches += 1
      break

print(str(num_clinches / NUM_SIMULATIONS))
37 Upvotes

9 comments sorted by

27

u/maddenallday Studman 1d ago

Nice! Inb4 someone tells you how you could somehow 1 line this in python

27

u/SadAdeptness6287 Steven Jackson 1d ago

print(“Rams have a 29% chance of clinching the division this week”)

Done!

7

u/Zro6 Donald Is Dolphin 1d ago

I don't code but you could 1 line this in python. I don't know what that means but you could definitely do it.

3

u/maddenallday Studman 1d ago

Probably like ‘if (random() <= RAMS_WIN_PROB) && (sum(list(map(lambda x: random() <= x, OTHER_WIN_PROBS))) >= 4’

1

u/[deleted] 1d ago

[removed] — view removed comment

2

u/AutoModerator 1d ago

Your comment has been automatically removed and is not visible to other users. This is because we do not allow accounts under the age of 7 days to participate in our community.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Kimber80 1d ago

I suspect we will not get any help. Need to win out.

1

u/New_Commission_2619 23h ago

Nah, this just means we may have to wait for games the following week to play out and won’t have to beat the Seahawks. I still think we will beat them though