Skip to content

Instantly share code, notes, and snippets.

@stringertheory
Created January 27, 2019 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stringertheory/59b8b20f2d4c64125e4d6b95adf1143a to your computer and use it in GitHub Desktop.
Save stringertheory/59b8b20f2d4c64125e4d6b95adf1143a to your computer and use it in GitHub Desktop.
How many times to repeat something before it sinks in with a group of people?
import random
import collections
n = 100
p_attend = 0.5
p_listen = 0.5
n_to_remember = 2
people = list(range(n))
random.shuffle(people)
trial_holder = collections.defaultdict(list)
for trial in range(1000):
listen_count = collections.Counter()
for meeting_number in range(1, 31):
attend = []
listen = []
for i in people:
if random.random() < p_attend:
attend.append(i)
for j in attend:
if random.random() < p_listen:
listen_count[j] += 1
get_it_count = sum(int(k >= n_to_remember)
for k in listen_count.values())
trial_holder[meeting_number].append(get_it_count)
for i, j in sorted(trial_holder.items()):
avg = sum(j) / float(len(j))
print(i, avg)
@stringertheory
Copy link
Author

stringertheory commented Jan 27, 2019

This is a model of how many times something needs to be announced before it "sinks in", or maybe is "commonly known", with a group. Imagine there's a repeated meeting, where some probability that people attend (p_attend), some probability that they hear it, understand it, or find the announcement relevant given that they attend (p_listen), and that people need to hear something more than once before it "sinks in" (n_to_remember). Here's what the number of announcements vs the fraction of the group for which the announcement has sunk in.

image

This is way over-simplified, and doesn't have anything about:

  • people sharing the content of the announcement outside of the context of the meeting
  • allowing for variation among people
  • whether the "announcement" seems like something worth paying attention to
  • anything else that makes it more realistic

Still kind of interesting to see how it varies...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment