You have 30 students in a class. All 30 names are put into a hat. One name is drawn out then put back in for a second drawing. What are the chances of drawing the same name both times?
1/30
Your first choice can be any name, ie. a 30/30 chance. And then your second choice can only be that one name, ie. a 1 in 30 chance.
Ergo: (30/30)*(1/30)=(1/30)
Now - if you wanted a particular name to come out, before the first selection, that would be 1/30 * 1/30 = 1/900.
Or if you don't replace the name... well... then you're in trouble...
Well, think...
There is a 1 in 30 chance a given student's name is drawn. If you put their card back into the hat, then the set of possible events remains the same, so the chances stay the same.
The probability of drawing a given name twice is equal to $\displaystyle \left(\frac{1}{30}\right)^2 = \frac{1}{900}$
The probability of drawing the same name twice considers the possibility of drawing any of the other 29 students' names twice in a row. That gives our probability 30 different ways of happening.
$\displaystyle 30*\frac{1}{900} = \frac{1}{30}$
Our answer for two is the same as one, but why?
Well... if we are looking in GENERAL for the same student picked twice, then it doesn't matter which student is picked the 1st time (p = 100%) as long as they are picked the 2nd time (1 in 30).