Proof that the derivative of the prime counting function is the probability of prime? The derivative of the estimation of the prime counting function, $\frac{x}{ln(x)}$, is $\frac{ln(x)-1}{ln(x)^2}$, which is approximately $\frac{1}{lnx}$ for large values of $x$. According to the prime number theory, $\frac{1}{lnx}$ is the probability that a randomly chosen integer between 2 and $x$ is a prime number.
Why is the derivative of the prime counting function the probability of getting a prime number?
Edit: I've only studied up to basic integrals, so try to keep it simple!
 A: You are describing Cramer's model of the primes, which is pretty good. However, Maier showed about 1985 that it gave incorrect estimates for short intervals. See if i can find it, it's a famous episode. 
Maier's theorem
A: This is not precise, because $\pi(x)$ is neither continuous nor differentiable, but you get the idea :-)
Mean value theorem:
$$
\pi(x+1)-\pi(x)=\pi'(\xi)[(x+1)-x]=\pi'(\xi)
$$
for some $\xi\in(x,x+1)$. But $\pi(x+1)-\pi(x)$ is either zero or one according to whether $x+1$ is prime or not. So probabilistically we get the result you described. Or you can look at a longer interval. 
A: The reason for calling it a probability (or better, a probability distribution), is because when we are given a probability distribution with density $p(x)$ at event x then by the definition of such a density, we expect the total probability $P(a \le x \le b)$ for an event to occur between a and b to be given by
$$P(a \le x \le b)=\int_a^b p(x) dx$$
By the Fundamental Theorem of Calculus, then, we can expect that p will have a differential relation to P here, and P will be $\pi(z)$ if a is 2 and b is z.  This is why you see the differential relationship you ask about. 
Now, we actually are not looking at probabilities here, as the integrations clearly can be greater than 1.  So maybe the confusion is why call this a probability at all.  Well, there are two related reasons.  First, what P really is when we use the expression above is the "expected number of primes between a and b", if we assume primes are distributed randomly.  This is still a probabilistic function, so the term probability is often used loosely.  More rigorously, though, something called "extended probabilities" can be used for just this kind of circumstance, and we can just relabel things here.  So there is a sense we are really talking about a probability, just not one from 0 to 1.  And we could use this to define the probability of finding one prime between a and b using common statistical techniques (it looks nothing the probability you mention, though).
However, this way of looking at p is used really loosely in general.  Clearly, Bertrand's postulate (theorem) ensures a prime between n and 2n with certainty, so the random distribution has some constraints.  We know if p (>2) is prime, then the next number p+1 has 0 probability of being prime (and similarly, if p and p+2 then not p+4, etc.). And we know other relationships that affect higher moments of prime distribution as well.  This talk is just to get a very basic first order look at primes because we don't have an easy function that shows their distribution, but we can flatten it out with approximations and look at those.  That's the point of the Prime Number Theorem, to take that big view and see what we can understand just by squinting hard enough.
