Wikipedia:Reference desk/Archives/Mathematics/2013 September 21

Mathematics desk
< September 20 << Aug | September | Oct >> September 22 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


September 21 edit

annuities, compound interest and simple interest edit

Is there a website that shows you how to do a simple interest calculations, compound interests and annuities in an easy way and and how you can tell if the question is talking about either a future value or present value or other things? — Preceding unsigned comment added by 174.89.40.56 (talk) 16:09, 21 September 2013 (UTC)[reply]

Start with this link describing Interest Describes multiple types of interest and their calculations.
This page walks you through a simple interest calculation, eventually getting you to the answer. It is set up in a way that it is easy to understand and the data fields are self-explanatory.
There are many places to find help with compound interest and their calculations. Try this link It has data fields where you can enter all the information needed in order to find the amount of interest to be charged or paid. Ice24710 (talk) 20:05, 21 September 2013 (UTC)[reply]

automobile speeds at passing edit

how fast do I have to drive to pass a vehicle doing 90kph? Is there a graph for this? It always seems like they speed up when I pass, or is that just an illusion? — Preceding unsigned comment added by 209.121.225.128 (talk) 18:57, 21 September 2013 (UTC)[reply]

Suppose that you pass from 10 meters behind and you want to move 10 meters past it before moving in front of the vehicle. The time needed for that will then be 20 meters/(relative speed). So, to be able to pass the car in 15 seconds the relative speed needs to be 4/3 m/s = 4.8 km/h. If you travel at 94.8 km/h you will travel a distance of 395 meters in that 15 seconds.
I think the distance needed affects the perception of time, obviously if you need to pass in short distance, you will need to travel at a large speed. E.g. to pass in 50 meters you need to travel at 150 km/h, which may be a lot faster than what you might intuitively expect. Count Iblis (talk) 19:13, 21 September 2013 (UTC)[reply]
A couple additional points:
1) The length of the vehicle you are passing also may be significant, especially in the case of long cargo trucks. This distance needs to be added to the 20m in the above example.
2) The vehicle you are trying to pass may indeed speed up. The drivers aren't just being jerks, though. Subconsciously, we judge our own speed based on the speed of other vehicles on the road. So, if we are passing every other vehicle on the road, we think we are going too fast, and slow down, while if every other car on the road is passing us, we think we are going too slow, and speed up. In the case of only two vehicles, that makes each driver adjust their speed to be closer to the other, which increases passing time. The obvious solution to this problem is cruise control. StuRat (talk) 00:20, 22 September 2013 (UTC)[reply]

Random walk problem edit

Hi, I've got a problem I can't figure out. A player flips a weighted coin where he wins $1 with probability p or loses $1 with probability 1-p, where p>0.5. The game ends when he reaches some positive amount x. What is the average amount of flips it takes to end the game? I'm thinking it has something to do with Stirling's numbers but have had no success thus far 78.0.223.206 (talk) 20:59, 21 September 2013 (UTC)[reply]

For x=1, the probability is p that 1 flip is required, p2(1-p) that 3 flips are required, 2p3(1-p)2 that 5 flips are required and in general Cnpn+1(1-p)n that 2n+1 flips are required, where Cn is the nth Catalan number. From this I get the expectation is 1+2p2(1-p)C'(p(1-p)) where C(x) is the generating function for Cn. (Note, C(p(1-p))=1/p for p>.5.) Plugging in the formula for C(x) (see the article) and simplifying, I get the expectation is 1/(2p-1) (p>.5). For x>1 you'd probably utilize Bertrand's ballot theorem so get the probabilities, but I think the calculations are a bit too hairy for me to tackle at the moment. --RDBury (talk) 22:26, 21 September 2013 (UTC)[reply]
Once you know the answer for 1, can't you just use linearity of expectation to argue the general answer is x/(2p-1)? Our random variables are v_1 through v_x, where v_i is the number of flips from the first moment we are up by i-1 dollars until the first moment we are up by i dollars. Clearly E[v_i] = E[v_1], which you've just argued is 1/(2p-1). We want E[v_1 + ... + v_x] = E[v_1] + ... + E[v_x] = x/(2p-1).--80.109.106.49 (talk) 22:44, 21 September 2013 (UTC)[reply]
This sort of problem is called (in some disciplines) a first hitting time problem for a Bernoulli process. The number of flips is distributed according to a negative binomial distribution. --Mark viking (talk) 23:10, 21 September 2013 (UTC)[reply]
It would be Bernoulli if you were just waiting for the first win, but the fact that when you lose you have to make it up with a win to get back to where you started complicates the problem. I would be surprised though if the problem isn't already well studied. The coefficients of the probabilities from Catalan's triangle whose generating function is known. To respond to the comment above, I don't there's any reason to assume the result is linear in x. --RDBury (talk) 01:58, 22 September 2013 (UTC)[reply]
Actually it would be linear, good point. --RDBury (talk) 02:01, 22 September 2013 (UTC)[reply]
A standard approach for this kind of problems is conditioning on the first step. Denoting by   the expected number of flips when the goal is x, then after a flip our new relative goal will be either   or  , so we have the recurrence relation
 
From which it is possible to deduce that   is linear. For figuring out the actual slope, I can't currently think of a better way than RDBury's. -- Meni Rosenfeld (talk) 20:20, 23 September 2013 (UTC)[reply]
You've made a small mistake with the equation, since you're not counting the first flip. It should be
 
I don't see how you can deduce linearity from this, but once you know linearity, it's easy to use this to get the slope. Simply distribute and collect to get
 
 
 --80.109.106.49 (talk) 18:04, 25 September 2013 (UTC)[reply]

Thanks, guys. I figured this was the likely solution, given that the EV of x/(2p-1) games is x. Very good point about Catalan's numbers, mixed them up with Stirling's. It's been a long time since I learned that stuff :) 78.0.212.73 (talk) 16:36, 24 September 2013 (UTC)[reply]