Picture a horizontal line and points scattered around it. If there are many points, the line will be dark and there’ll be a cloud around it. If there are few points, you’ll get a vague shape and it won’t be easy to tell where the line originally was.
Rigorous answer:
print [
len(filter(lambda x: x > 0.6 *per_day,
[
sum([ randint(0,1) for birth in range(0, per_day) ])
for day in range(0, 365)
]))
for per_day in (15, 45)
]
Thoughtful answer: Why would I bother thinking? Fetch me an apple.
Edit: For copulation’s sake, whose kneecaps do I have to break to make Markdown leave my indentation the Christian Underworld alone, and who wrote those filthy blatant lies masquerading as comment formatting help?
whose kneecaps do I have to break to make Markdown leave my indentation the Christian Underworld alone
There may be a more convenient method, but using non-breaking spaces ( ) works.
print [
len(filter(lambda x: x > 0.6 *per_day,
[
sum([ randint(0,1) for birth in range(0, per_day) ])
for day in range(0, 365)
]))
for per_day in (15, 45)
]
Certain browsers (early versions of Firefox, at least) for some reason automatically replace all hard spaces with regular spaces when submitting a form.
Edit: For copulation’s sake, whose kneecaps do I have to break to make Markdown leave my indentation the Christian Underworld alone, and who wrote those filthy blatant lies masquerading as comment formatting help?
Imagine you have a random sample with n observations x_1, …, x_n, independently and identically distributed according to some distribution with mean mu and variance s^2.
The sample mean is sum(x_i)/n (the expected value is mu as one would hope). Doing some manipulations we find that this has variance s^2/n, i.e. a large n means a small variance, so larger samples are more tightly clustered around mu.
print [
len(filter(lambda x: x > 0.6 *per_day,
[
sum([ randint(0,1) for birth in range(0, per_day) ])
for day in range(0, 365)
]))
for per_day in (15, 45)
]
Intuitive answer:
Picture a horizontal line and points scattered around it. If there are many points, the line will be dark and there’ll be a cloud around it. If there are few points, you’ll get a vague shape and it won’t be easy to tell where the line originally was.
Rigorous answer:
Thoughtful answer: Why would I bother thinking? Fetch me an apple.
Edit: For copulation’s sake, whose kneecaps do I have to break to make Markdown leave my indentation the Christian Underworld alone, and who wrote those filthy blatant lies masquerading as comment formatting help?
For another intuitive answer, try lower values of 15, like 1.
The Python code works better, on my machine, if I add the line “from random import randint” at the top.
There may be a more convenient method, but using non-breaking spaces ( ) works.
Certain browsers (early versions of Firefox, at least) for some reason automatically replace all hard spaces with regular spaces when submitting a form.
EDIT: Apparently not. Very likely a bug then.
The usual kludge is to replace spaces with full stops.
That’s not such a rigorous answer:
Imagine you have a random sample with
n
observationsx_1
, …,x_n
, independently and identically distributed according to some distribution with meanmu
and variances^2
.The sample mean is
sum(x_i)/n
(the expected value ismu
as one would hope). Doing some manipulations we find that this has variances^2/n
, i.e. a largen
means a small variance, so larger samples are more tightly clustered aroundmu
.