Path: news.mathworks.com!not-for-mail
From: "Don " <don.jackson@coker.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Probability...Simple problem, need help getting started
Date: Wed, 1 Dec 2010 18:43:05 +0000 (UTC)
Organization: Coker
Lines: 15
Message-ID: <id64vp$hba$1@fred.mathworks.com>
Reply-To: "Don " <don.jackson@coker.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1291228985 17770 172.30.248.35 (1 Dec 2010 18:43:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Dec 2010 18:43:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2487474
Xref: news.mathworks.com comp.soft-sys.matlab:691621

Ok so my problem is, assume that the barbershop is open from 9-5, or for 8 hours a day. Person A and Person B each stay 30 min during visit, never longer, never shorter.
What is the probability that they run into one another?

Sample space: is 9-5 (The time the shop is open.) But should be denoted in matlab as 0-8.

The equation that satisfies the condition is -.5 < | x-y | < .5, which breaks down into two equations y < x +.5 and y > x - .5

Two graphs, and and the strip in the middle is the probability that they run into one another. To find the probability we must find the area of the strip in the middle, which we can do by simple math. (.5)(base)(height) which is this example is (.5)(7.5)(7.5) = 28.125 * 2 = 56.25 (Times it by two because of the two triangles made by the equations)


64 (total area of the 8x8 graph)   - 56.25 = 7.75/64 = 12 percent probability.

The math is easy for me to understand but programming throws me off.  If someone could give me a push in the right direction i'd appreciate it.

Thanks :)