Created
January 27, 2019 17:11
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.This is way over-simplified, and doesn't have anything about:
Still kind of interesting to see how it varies...