How to calculate the probability of an event when you don't know the initial probabilities? Say there are two coins: coin A is fair, but coin B always comes up heads.
A friend then flips one of the two coins, and you observe that the coin came up heads.
How do you calculate the probability that this was coin A, when you don't know if your friend chose the coin randomly or not?
 A: If you don't know your friend's motivation for picking the coin, it's very difficult to come up with a theoretical probability.
You have to somehow identify your current probability that your friend picked the fair coin... in Bayesian probability this is called the "prior" - your assessment of the probability before you collected the data. In the situation you describe, this might have to be a subjective decision. There is extensive discussion of "uninformative priors" at the link provided.
Remember, that probability is based on the information that you have, and can change depending on what new information you collect.
For example, if your friend makes some knowing wink or comment, you might interpret this as a reason to change your prior probability.
If I have some reason to know that my friend would have picked coin A (like, she prefers tails), then I might assess the probability of coin A to be 1, or under other circumstances 0, or indeed anything in between.
Suggestion: Unless you have some reason to believe that your friend picked in a particular way, it might be sensible to set your prior as though your friend chose randomly (in that case, the posterior probability of coin A would be 1/3).
If your chosen prior probability that your friend picked coin A is set at $p$,
then the resulting posterior probability (after you observe a head) that your friend picked coin A will be $(0.5p)/(1-0.5p)$.
Typically, the 'heads' observation will revise your probability of coin A downwards from the probability you initially thought (unless $p=0$ or $p=1$).
A: Assuming that your friend chose the coin randomly, what we are looking for is what is the probability that your friend chose coin A given that when he flipped it he got a heads. Note that this can we written as $P(\text{coin A}|\text{heads})$. To solve this we use the well known $P(A|B)=\frac{P(A\cap B)}{P(B)}$. Therefore we get $P(\text{coin A}|\text{heads})=\frac{P(\text{coin A}\cap\text{heads})}{P(\text{heads})}$. Using a tree diagram we can find that the probability of choosing coin A and then getting a heads is $\frac{1}{4}$ while the probaility of getting heads is $\frac{3}{4}$. Therefore we get $P(\text{coin A}|\text{heads})=\frac{0.25}{0.75}=\frac{1}{3}$
A: You can never arrive at an exact answer - you can only guess at how your friend chooses the coin, and then see how likely your guess is to be true.  
You might make the hypothesis that your friend always chose coin $B$.  In that case, the probability of getting a head would be $0.5$ - you might not think that was likely enough, but most hypotheses are rejected only when they predict that the observed behaviour will occur with probability at most $0.1$.  
You might suppose that your friend chooses the coins at random.  In that case, the probability of getting a head would be $0.75$ - that seems likely enough.  
The fact that the coin landed heads is, unfortunately, not enough to tell you anything about how your friend had chosen the coin.  If it had landed on tails, then you would know that your friend had chosen $B$, and you would know that she had not adopted the strategy 'always choose heads', and you could be reasonably confident that she had not adopted the strategy 'choose heads with probability $0.99$; otherwise, choose tails'.  Of course, in that case, you would know that your friend had chosen $B$, but...
So you really have nothing to work with.  What you need to do is to repeat the process a number of times, assuming that your friend uses the same strategy each time.  
Suppose we wish to test the hypothesis that your friend chooses the coin randomly with probability $\frac{1}{2}$.  Get your friend to toss the coin $10000$ times.  Now we define the $95\%$ confidence interval for the number of heads under our hypothesis to be a range of values for the number of heads such that if our hypothesis is correct, there is a $0.95$ chance that the number of heads lies in that range.  A quick calculation (details of which I am happy to provide) shows that this interval is [7415,7585].  So if your friend tosses $7503$ heads, you can be reasonable confident in your hypothesis.  However, if she tosses $8703$, then you are probably wrong.  
Suppose you have good reason to believe that your friend is choosing the coins randomly with probability $\frac{1}{2}$, and you observe her toss $7503$ out of $1000$ heads.  Then you have no evidence to reject your hypothesis, so you accept it.  Now suppose your friend tosses again and gets a head.  Using Emile's method, you know the probability she chose coin $A$ is $\frac{1}{3}$.  
