User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Quick Math Page 1 2 3 4 [5], Prev  
fjjackso
All American
14538 Posts
user info
edit post

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

392
Suspended
2488 Posts
user info
edit post

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 purchase

in order to collect all 52 cards?

10/17/2007 2:09:48 PM

philihp
All American
8349 Posts
user info
edit post

is the distribution uniform?

10/17/2007 2:14:18 PM

392
Suspended
2488 Posts
user info
edit post

^
Quote :
"every bottle of PBR you open has a cap with a random[ly distributed] card"

10/19/2007 11:52:40 AM

392
Suspended
2488 Posts
user info
edit post

did I stump ya?

10/20/2007 9:07:58 AM

wwwebsurfer
All American
10217 Posts
user info
edit post

52/12=4.whocares

You'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

LimpyNuts
All American
16859 Posts
user info
edit post

^not even close

The 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

392
Suspended
2488 Posts
user info
edit post

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

LimpyNuts
All American
16859 Posts
user info
edit post

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, repeat


After 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), IIRC
god 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

LimpyNuts
All American
16859 Posts
user info
edit post

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 Beers
Monte 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))
PAUSE

END PROGRAM

10/22/2007 7:19:14 PM

StillFuchsia
All American
18941 Posts
user info
edit post

Quote :
"I redid the simulation in FORTRAN."


icky

10/22/2007 7:21:22 PM

Aficionado
Suspended
22518 Posts
user info
edit post

fortran is still one of the best number crunchers

10/22/2007 7:23:24 PM

LimpyNuts
All American
16859 Posts
user info
edit post

I only know 2 programming languages inside and out.

10/22/2007 7:41:40 PM

StillFuchsia
All American
18941 Posts
user info
edit post

Fortran is evil

this I know for sure

10/22/2007 7:42:04 PM

LimpyNuts
All American
16859 Posts
user info
edit post

FORTRAN is [old] but not evil.


I am evil.

10/22/2007 7:43:14 PM

fjjackso
All American
14538 Posts
user info
edit post

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

LimpyNuts
All American
16859 Posts
user info
edit post

dv=exp(-y)dy
u=y^(a-1)
v=-exp(-y)
du=(a-1)y^(a-2)dy

u 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) = 0

so

(a-1) * int(y^(a-2)exp(-y)dy, y=0..inf)

10/23/2007 4:48:35 PM

LimpyNuts
All American
16859 Posts
user info
edit post

10/25/2007 2:08:29 PM

392
Suspended
2488 Posts
user info
edit post

1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + . . . + 1/n >= 1337

what is the smallest value of n?

10/26/2007 9:25:59 AM

ThePeter
TWW CHAMPION
37709 Posts
user info
edit post

1

10/26/2007 9:46:36 AM

392
Suspended
2488 Posts
user info
edit post

^
you're saying

1 >= 1337

that is wrong

10/26/2007 10:06:48 AM

mrfrog

15145 Posts
user info
edit post

1051200 Btu / hr-ft^2

10/26/2007 10:51:21 AM

ThePeter
TWW CHAMPION
37709 Posts
user info
edit post

2

10/26/2007 11:04:40 AM

392
Suspended
2488 Posts
user info
edit post

Quote :
"1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + . . . + 1/n >= 1337

what is the smallest value of n?"

10/31/2007 8:11:41 AM

DPK
All American
2390 Posts
user info
edit post

1337^-1

10/31/2007 8:14:32 AM

392
Suspended
2488 Posts
user info
edit post

no

n {1,2,3,...]
1337^-1 {1,2,3,...]

10/31/2007 8:48:36 AM

fjjackso
All American
14538 Posts
user info
edit post

must not die

1/1/2008 10:27:20 PM

LimpyNuts
All American
16859 Posts
user info
edit post

Quote :
"1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + . . . + 1/n >= 1337

what is the smallest value of n?"

Integer overflow

a very, very, very large number

1/1/2008 10:45:15 PM

fjjackso
All American
14538 Posts
user info
edit post

n=100 p=.30

the standard deviation is 4.58258 right?

2/27/2008 11:58:32 PM

392
Suspended
2488 Posts
user info
edit post

HAAHAHAHAHHAHAHAHAHAHAHAHAHA

2/28/2008 2:13:58 AM

fjjackso
All American
14538 Posts
user info
edit post

sqrt(np(1-p))

2/28/2008 2:14:31 AM

fjjackso
All American
14538 Posts
user info
edit post

??? what say you

2/28/2008 2:17:26 AM

icancount
Veteran
421 Posts
user info
edit post

= 2·11·17

3/24/2008 10:05:44 PM

icancount
Veteran
421 Posts
user info
edit post

= sum of ten consecutive primes (19 + 23 + 29 + 31 + 37 + 41 + 43 + 47 + 53 + 59)

3/24/2008 10:16:44 PM

 Message Boards » Chit Chat » Quick Math Page 1 2 3 4 [5], Prev  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.