From 1677d6337505994869c196229c5edd2788a1353e Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 14 Apr 2022 21:53:45 -0400 Subject: [PATCH] fix: std of lognormal symbolic division --- .../src/rescript/Distributions/SymbolicDist/SymbolicDist.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index afd35800..0ef8b3d0 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -167,7 +167,7 @@ module Lognormal = { let mu = l1.mu -. l2.mu // We believe the ratiands will have covariance zero. // See here https://stats.stackexchange.com/questions/21735/what-are-the-mean-and-variance-of-the-ratio-of-two-lognormal-variables for details - let sigma = l1.sigma +. l2.sigma + let sigma = Js.Math.sqrt(l1.sigma ** 2. +. l2.sigma ** 2.) // m #Lognormal({mu: mu, sigma: sigma}) } let operate = (operation: Operation.Algebraic.t, n1: t, n2: t) =>