equal
deleted
inserted
replaced
743 also have "\<dots> \<longleftrightarrow> integrable N (\<lambda>x. Px x * f (T x))" |
743 also have "\<dots> \<longleftrightarrow> integrable N (\<lambda>x. Px x * f (T x))" |
744 using measurable_comp[OF T f] Px by (intro distributed_integrable[symmetric]) (auto simp: comp_def) |
744 using measurable_comp[OF T f] Px by (intro distributed_integrable[symmetric]) (auto simp: comp_def) |
745 finally show ?thesis . |
745 finally show ?thesis . |
746 qed |
746 qed |
747 |
747 |
|
748 lemma distributed_integrable_var: |
|
749 fixes X :: "'a \<Rightarrow> real" |
|
750 shows "distributed M lborel X (\<lambda>x. ereal (f x)) \<Longrightarrow> integrable lborel (\<lambda>x. f x * x) \<Longrightarrow> integrable M X" |
|
751 using distributed_integrable[of M lborel X f "\<lambda>x. x"] by simp |
|
752 |
748 lemma (in prob_space) distributed_variance: |
753 lemma (in prob_space) distributed_variance: |
749 fixes f::"real \<Rightarrow> real" |
754 fixes f::"real \<Rightarrow> real" |
750 assumes D: "distributed M lborel X f" |
755 assumes D: "distributed M lborel X f" |
751 shows "variance X = (\<integral>x. x\<^sup>2 * f (x + expectation X) \<partial>lborel)" |
756 shows "variance X = (\<integral>x. x\<^sup>2 * f (x + expectation X) \<partial>lborel)" |
752 proof (subst distributed_integral[OF D, symmetric]) |
757 proof (subst distributed_integral[OF D, symmetric]) |