Skip to content

Commit

Permalink
Update theories/probability.v
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Roux <[email protected]>
  • Loading branch information
affeldt-aist and proux01 committed Apr 10, 2023
1 parent 05bce1c commit a1c906e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions theories/probability.v
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@ rewrite mule_natl mule2n oppeD; last by rewrite fin_num_adde_defl// fin_numX.
by rewrite addeA subeK// fin_numX.
Qed.

Lemma variance_ge0 (X : {RV P >-> R}) : (0 <= 'V_P[X])%E.
Proof. by apply: expectation_ge0 => x; apply: sqr_ge0. Qed.

Lemma variance_cst r : 'V_P[cst r] = 0%E.
Proof.
rewrite /variance expectation_cst/=.
rewrite [X in 'E_P[X]](_ : _ = cst 0%R) ?expectation_cst//.
by apply/funext => x; rewrite /GRing.exp/GRing.mul/= subrr mulr0.
Qed.
End variance.
Notation "'V_ P [ X ]" := (variance P X).

Expand Down

0 comments on commit a1c906e

Please sign in to comment.