@@ -452,7 +452,7 @@ impl ConjugatePrior<usize, StickBreakingDiscrete> for BetaPrime {
452452#[ cfg( test) ]
453453mod tests {
454454 use rand:: SeedableRng ;
455- use rand_xoshiro:: { Xoshiro256Plus } ;
455+ use rand_xoshiro:: Xoshiro256Plus ;
456456
457457 use super :: * ;
458458 use crate :: test_basic_impls;
@@ -481,10 +481,10 @@ mod tests {
481481 fn mean_when_beta_gt_one ( ) {
482482 let mut rng = Xoshiro256Plus :: seed_from_u64 ( 123 ) ;
483483 let bp = BetaPrime :: new ( 2.0 , 3.0 ) . unwrap ( ) ;
484-
484+
485485 // Theoretical mean
486486 let mu_theory: f64 = bp. mean ( ) . unwrap ( ) ;
487-
487+
488488 // Sample mean
489489 let n = 1000 ;
490490 let mut s = 0.0 ;
@@ -493,7 +493,7 @@ mod tests {
493493 s += x;
494494 }
495495 let mu_sample = s / n as f64 ;
496-
496+
497497 assert:: close ( mu_sample, mu_theory, 0.03 ) ;
498498 }
499499
@@ -508,10 +508,9 @@ mod tests {
508508 let mut rng = Xoshiro256Plus :: seed_from_u64 ( 123 ) ;
509509 let bp = BetaPrime :: new ( 10.0 , 15.0 ) . unwrap ( ) ;
510510
511-
512511 // Theoretical variance
513512 let var_theory: f64 = bp. variance ( ) . unwrap ( ) ;
514-
513+
515514 // Sample variance assuming correct mean
516515 let mean = bp. mean ( ) . unwrap ( ) ;
517516 let n = 1000 ;
@@ -523,7 +522,7 @@ mod tests {
523522
524523 // Calculate variance
525524 let var_sample: f64 = sse / n as f64 ;
526-
525+
527526 assert:: close ( var_sample, var_theory, 0.01 ) ;
528527 }
529528
0 commit comments