Probability of intersection in conditional probability Suppose there are seven keys:


*

*5 red keys.

*2 green keys.


Only one of those seven keys opens a lock.
If for the experiment "Choose a random key and see if it opens the lock", I define the following events:


*

*A: "The chosen key opens the lock".

*G: "The right key is green".


And knowing that:


*

*The probability of A is: 1/7.

*The probability of G is: 2/7.

*The probability of A knowing that the key is green is: 1/2


According to the relationship in conditional probability, the probability of A intersection G is: 1/7
Because p(A|G) = A intersection G / p(G)
But according to the probability of an intersection of independent events, the probability of A intersection G should be: 1/7 * 2/7 = 2/49
I do not understand why I get different values.
 A: This is not quite a random experiment as it is determined in advance which key opens the lock. So, your calculations involving G are illegal.
A: 
G:"The right key is green"

This can not be recognized as an event linked with the experiment that you descibe. There are seven keys and one of them opens a lock and this key allready has its color: it is red or it is green.
Then you can ask questions like: if the right key is green, then what is the probability that it is picked? In mathematical notation something like: $$\Pr(A\mid G)=?$$
This notation is disputable, since - as I said - $G$ is not an event here. You can compare it with  something like $\Pr(D=5\mid R)$ where $D=5$ stands for the event that a thrown die gives $5$ and $R$ stands for: "it rains at the moment". Then $R$ not restricting/influencing the experiment.
The color of the correct key will have no influence here. So we get: $$P(A\mid G)=P(A)=\frac17$$
In fact the knowledge about its color is not affecting the experiment.
A: The problem is you are assuming in your last calculation that $A$ and $G$ are independent.  In general,
$$\mathbb{P}(A \cap G) = \mathbb{P}(A \mid G) \cdot \mathbb{P}(G) \neq \mathbb{P}(A) \cdot \mathbb{P}(G).$$
The fact that $\mathbb{P}(A \mid G) = \frac{1}{2}$ and not $\frac{1}{7}$ is telling you the two events are not independent, and that's the reason you're getting different values.
