Statistical test to establish that event B is caused by event A I want to have a statistical test to establish that event B is caused by event A
Here
event B is customers that are supposed to leaved leave for competitor stay in our company
event A is an attractive offer for some customers (some may leave, and some may stay)
If we know that some of our customers is going to go for the competitor, and we come up with an attractive offer for them to stay.
If in the end, we notice that there were fewer customers that are leaving for competitors (event B), is there a statistical test that helps to establish a relationship that it is the attractive offer (event A) that retains those customers that will otherwise leave (event B)?
This would be done with a controlled experiment, similar to clinical tests:

Randomly assign customers into to groups 1 and 2. Group 1 is given the attractive offer, group 2 is not (control group).
It's important to avoid any external bias, so for example ideally nobody in the company should know whether a customer is in group 1 or group 2. The goal is to make sure that the only difference between the two groups is the offer.

After a pre-determined duration (e.g. 3 months), collect the results (how many customers in group X have left/stayed). Then a simple Chi-square test can be performed on the 2x2 contingency table in order to assess whether there's a significantly different rate of leaving between the two groups. Since the offer is the only possible explanation, this proves that the offer causes the difference.