pretty sure its -20/x, but i dont want to fuck it up again... ti-89 is mia too
10/17/2007 1:50:11 PM
every bottle of PBR you open has a cap with a random card what is the average number of 12-packs of PBR necessary for one to purchasein order to collect all 52 cards?
10/17/2007 2:09:48 PM
is the distribution uniform?
10/17/2007 2:14:18 PM
^
10/19/2007 11:52:40 AM
did I stump ya?
10/20/2007 9:07:58 AM
52/12=4.whocaresYou'll need 5, assuming they're perfectly random. Get 10 just to make sure.[Edited on October 21, 2007 at 3:21 PM. Reason : .]
10/21/2007 3:21:30 PM
^not even closeThe probability of getting the whole set in 52 bottles is 52!/52^52 or really damn unlikely.It actually requires 260 bottles on average, or 22 cases.
10/21/2007 3:50:25 PM
show your math [Edited on October 21, 2007 at 6:33 PM. Reason : are you sure it's not 20?]
10/21/2007 6:33:26 PM
I didn't do any math. I wrote a monte carlo program that:- randomly collected a card- marked its position in a deck- checked to see if the deck was complete- if not, repeatAfter running a few thousand tests, the results showed an average of 259.4 bottles with a standard deviation of 80 bottles. The statistical uncertainty in the mean (sigma) was 1.3 bottles. I didn't calculate the sigma of the standard deviation.That was enough information to say: it requires 22 cases (plus or minus a bottle or 2 is still 22 cases)The answer may still be wrong, but it's unlikely that it's off by more than a few bottles (99.999+ % chance of being within 10 bottles of 260 unless my random number generator is fucked).The actual math to derive the analytic solution is far more time consuming than writing a monte carlo solution and typing up this response. A derivation of it is easily found in a statistics book under "coupon collecting".The answer should be 52* Sum(1/n, n=1..52), IIRCgod damnit.... 236 beers. WTF is up with the random number generator in Excel then?[Edited on October 22, 2007 at 1:00 PM. Reason : ][Edited on October 22, 2007 at 1:01 PM. Reason : ]
10/22/2007 12:57:53 PM
I redid the simulation in FORTRAN. The problem in excel is I forgot to use the INT() function somewhere and it was rounding instead of the integer part.Correct answer: 235.9782 BeersMonte Carlo answer: 235.9717 +/- 0.007 Beers
PROGRAM T INTEGER i,k,n,r,count REAL*8 count2,ctsq,r2 LOGICAL CARDS(52) count2=0 ctsq=0 N=100000 DO k=1,N count=0 i=52 CARDS=.FALSE. DO count=count+1 CALL RANDOM_NUMBER(r2) r = INT(r2*52D0)+1 IF (CARDS(r).eq..FALSE.)THEN CARDS(r)=.TRUE. i=i-1 IF(i.eq.0)EXIT END IF END DO count2=count2+count ctsq=ctsq+count*count END DO WRITE(*,*) count2/dble(n) WRITE(*,*) SQRT((ctsq-count2*count2/n)/dble(n)/dble(n-1)) PAUSEEND PROGRAM
10/22/2007 7:19:14 PM
10/22/2007 7:21:22 PM
fortran is still one of the best number crunchers
10/22/2007 7:23:24 PM
I only know 2 programming languages inside and out.
10/22/2007 7:41:40 PM
Fortran is evilthis I know for sure
10/22/2007 7:42:04 PM
FORTRAN is [old] but not evil.I am evil.
10/22/2007 7:43:14 PM
integrate by parts: [y^(a-1)*e^-y] dy from 0 to infinite show your steps to prove that this is equal to(a-1) * integral (y^(a-2)*e^-y)dy from 0 to infinite... a=alpha
10/23/2007 4:20:27 PM
dv=exp(-y)dyu=y^(a-1)v=-exp(-y)du=(a-1)y^(a-2)dyu dv = uv - v du=-0^(a-1)*exp(-0)+(+inf)^(a-1)*exp(-inf)+ (a-1) * int(y^(a-2)exp(-y)dy)-0^(a-1)*exp(-0) = 0(+inf)^(a-1)*exp(-inf) = 0so(a-1) * int(y^(a-2)exp(-y)dy, y=0..inf)
10/23/2007 4:48:35 PM
10/25/2007 2:08:29 PM
1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + . . . + 1/n >= 1337what is the smallest value of n?
10/26/2007 9:25:59 AM
1
10/26/2007 9:46:36 AM
^you're saying1 >= 1337that is wrong
10/26/2007 10:06:48 AM
1051200 Btu / hr-ft^2
10/26/2007 10:51:21 AM
2
10/26/2007 11:04:40 AM
10/31/2007 8:11:41 AM
1337^-1
10/31/2007 8:14:32 AM
non {1,2,3,...]1337^-1 {1,2,3,...]
10/31/2007 8:48:36 AM
must not die
1/1/2008 10:27:20 PM
1/1/2008 10:45:15 PM
n=100 p=.30the standard deviation is 4.58258 right?]
2/27/2008 11:58:32 PM
HAAHAHAHAHHAHAHAHAHAHAHAHAHA
2/28/2008 2:13:58 AM
sqrt(np(1-p))
2/28/2008 2:14:31 AM
??? what say you
2/28/2008 2:17:26 AM
= 2·11·17
3/24/2008 10:05:44 PM
= sum of ten consecutive primes (19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)
3/24/2008 10:16:44 PM