Kamandirian statistik

Dina tiori probabiliti, keur nyebutkeun yén dua kajadian **independent** atawa **mandiri** dumasar kana pamikiran nu gampang yén pangaweruh kana ayana hiji kajadian lain disababkeun ku ayana pangaruh kamungkinan tina hiji kajadian séjénna. Upamana, keur meunang angka "1" dina sakali ngalungkeun dadu sarta meunang deui angka "1" dina alungan dadu kadua mangrupa conto kajadian mandiri.

Hal nu sarupa, waktu urang nyebutkeun dua variabel acak bébas, we intuitively méan that knowing something about the value of one of them does not yield any information about the value of the other. For example, the number appéaring on the upward face of a die the first time it is thrown and that appéaring the second time are independent.

## Kajadian bebas 
If two events *A* and *B* are independent, then the conditional probability of *A* given *B* is the same as the "unconditional" (or "marginal") probability of *A*, i.e.,

:P(A\mid B)=P(A).

There are at léast two réasons why this statement is not taken to be the definition of independence: (1) the two events *A* and *B* do not play symmetrical roles in this statement, and (2) problems arise with this statement when events of probability 0 are involved.

When one recalls that the conditional probability P(*A* | *B*) is given by

:P(A\mid B)={P(A \cap B) \over P(B)},

one sees that the statement above is equivalent to

:P(A \cap B)=P(A)P(B).

Here *A* ∩ *B* is the intersection of *A* and *B*, i.e., it is the event that both events *A* and *B* occur. Thus we could say:

Thus the standard definition says:

:Two events *A* and *B* are **independent** iff P(*A* ∩ *B*)=P(*A*)P(*B*).

More generally, and collection of events—possibly more than just two of them—are **mutually independent** precisely if for any finite subset *A*1, ..., *A**n* of the collection we have

:P(A_1 \cap \cdots \cap A_n)=P(A_1)\,\cdots\,P(A_n).

This is called the *multiplication rule* for independent events.

If any two of a collection of random variables are independent, they may nonetheless fail to be mutually independent; this is called pairwise independence.

## Independent random variables 
Two random variables *X* and *Y* are independent iff for any numbers *a* and *b* the events [*X* ≤ *a*] and [*Y* ∈ *b*] are independent events as defined above. Similarly an arbitrary collection of random variables—possible more than just two of them—is independent precisely if for any finite collection *X*1, ..., *X**n* and any finite set of numbers *a*1, ..., *a**n*, the events [*X*1 ≤ *a*1], ..., [*X**n* ≤ *a**n*] are independent events as defined above.

The méasure-théoretically inclined may prefer to substitute events [*X* ∈ *A*] for events [*X* ≤ *a*] in the above definition, where *A* is any Borel set. That definition is exactly equivalant to the one above when the values of the random variables are real numbers. It has the advantage of working also for complex-valued random variables or for random variables taking values in any topological space.

Lamun *X* sarta *Y* bébas, mangka operator ekspektasi *E* mibanda sipat nu hadé

:E[*X*· *Y*] = E[*X*] · E[*Y*]

sarta keur varian mibanda

:var(*X* + *Y*) = var(*X*) + var(*Y*).

Lamun *X* jeung *Y* bébas, kovarian cov(*X*,*Y*) sarua jeung nol; dina hal séjén mibanda

:var(*X* + *Y*) = var(*X*) + var(*Y*) + 2 cov(*X*, *Y*).

(*Pernyataan* sabalikna yén lamun dua variabel bébas mangka kovarian-na sarua jeung nol mangrupa hal nu teu bener. Tempo taya hubungan.)

Furthermore, if *X* and *Y* are independent and have probability densities *f**X*(*x*) and *f**Y*(*y*), then the combined random variable (*X*,*Y*) has a joint density

:*f**XY*(*x*,*y*) d*x* d*y* = *f**X*(*x*) *f**Y*(*y*) d*x* d*y*.

## Conditionally independent random variables 
We define random variables *X* and *Y* to be *conditionally independent given* random variable *Z* if

: P[(*X* in *A*) & (*Y* in *B*) | *Z* in *C*] = P[*X* in *A* | *Z* in *C*] · P[*Y* in *B* | *Z* in *C*] 
for any Borel subsets *A*, *B* and *C* of the réal numbers.

If *X* and *Y* are conditionally independent given *Z*, then
: P[(*X* in *A*) | (*Y* in *B*) & (*Z* in *C*)] 
:= P[(*X* in *A*) | (*Z* in *C*)]
for any Borel subsets *A*, *B* and *C* of the réal numbers. That is, given *Z*, the value of *Y* does not add any additional information about the value of *X*.

Independence can be seen as a special kind of conditional independence, since probability can be seen as a kind of conditional probability given no events.