# Probability that a stick arbitrarily damaged in 2 areas can create a triangular

Arbitrarily damage a stick (or an item of completely dry pastas, and so on) in 2 areas, creating 3 items. The probability that these 3 items can create a triangular is $\frac14$ (coordinatize the stick kind $0$ to $1$, call the damaging factors $x$ and also $y$, take into consideration the device square of the coordinate aircraft, color the locations that please the triangular inequality *modify*: see talk about the inquiry, listed below, for a far better description of this).

A few days ago in class^{*}, my teacher was showing just how to do a Monte Carlo simulation of this trouble on a calculator and also created a program that, for each and every test did the adhering to:

- Select an arbitrary number $x$ in between $0$ and also $1$. This is the first side size.
- Select an arbitrary number $y$ in between $0$ and also $1 - x$ (the remaning component of the stick). This is the 2nd side size.
- The 3rd side size is $1 - x - y$.
- Examination if the 3 side sizes please the triangular inequality (in all 3 permutations).

He ran around $1000$ tests and also was obtaining $0.19$, which he claimed was possibly simply random-chance mistake off $0.25$, yet every single time the program was run, despite that's calculator we made use of, the outcome was around $0.19$.

What's incorrect with the simulation method? What is the academic response to the trouble in fact being substitute?

(^{*} a few days ago was greater than $10$ years earlier)

The 3 triangular inequalities are

\begin{align} x + y &> 1-x-y \\ x + (1-x-y) &> y \\ y + (1-x-y) &> x \\ \end{align}

Your trouble is that in selecting the smaller sized number first from a consistent circulation, it's mosting likely to wind up being larger than it would certainly if you had actually simply selected 2 arbitrary numbers and also taken the smaller sized one. (You'll wind up with an ordinary value of $1/2$ for the smaller sized as opposed to $1/3$ like you in fact desire.) Currently when you select $y$ on $[0, 1-x]$, you're making it smaller sized than it need to be (winding up with ordinary value of $1/4$). To recognize this unequal circulation, we can replace $y (1-x)$ for $y$ in the initial inequalities and also we'll see the correct circulation.

(Note that the $y$ - axis of the chart does not actually go from $0$ to $1$ ; rather the leading stands for the line $y=1-x$. I'm revealing it as a square since that's just how the chances you were computing were being created.) Currently the probability you're gauging is the location of the oddly - designed area left wing, which is $$\int_0^{1/2}\frac1{2-2x}-\frac{2x-1}{2x-2}\,dx=\ln 2-\frac12\approx0.19314$$ I think that's the solution you computed.

Related questions