Thu Sep 29 16:44:43 2022 chance_test(): Python version: 3.6.9 Test chance(). dice_test(): Simulate the Newton-Pepys dice puzzle. Case 1 probability estimate is 0.654 Case 2 probability estimate is 0.609 Case 3 probability estimate is 0.563 logistic_sample_test(): Use the inverse CDF of the logistic distribution to produce 1000 sample points. normal_plot_test(): Plot the normal PDF for several parameter sets. numpy_random_test(): Demonstrate some features of the numpy random number generators. x = rng.random ( ): 0.987915058288835 s = rng.random ( size = 1 ): [0.84087992] s = rng.random ( size = 2 ): [0.84087992] a = rng.random ( size = [ 3, 4 ] ): [[0.18914764 0.45141033 0.63141279 0.40365929] [0.40399219 0.35194093 0.56167349 0.89788789] [0.14428344 0.93645137 0.05544609 0.67355051]] rng.seed() can reset the seed: rng = default_rng ( 123456789 ): x = rng.random ( ): 0.02771273928251694 x = rng.random ( ): 0.9067000554840227 rng = default_rng ( 123456789 ): x = rng.random ( ): 0.02771273928251694 x = rng.uniform(low=a,high=b,size=?) returns values in [a,b] Interval is [ 10 , 15 ] x = rng.uniform ( low = a, high = b ): 14.533500277420114 v = rng.uniform ( low = a, high = b, size = 5 ): [14.40696777 13.12448638 13.95357406 14.12954007 14.20852918] x = rng.standard_normal(size=?) returns normal random values with mean 0, standard deviation 1. v = rng.standard_normal ( size = [ 3, 4 ] ): [[ 1.14633764 1.7473833 0.12327598 -0.34086587] [ 0.1500319 0.84465446 0.90357677 -0.28058986] [-0.98720833 1.02633847 -1.04710489 2.80647303]] x = rng.normal(loc=mu,scale=sigma,size=?) returns normal random values with mean mu, standard deviation sigma. v = rng.normal ( loc = 10, scale = 0.5, size = [ 3, 4 ] ): [[11.16313724 10.60769281 10.16467977 9.46862195] [ 9.37408693 10.02587798 10.70765444 9.45749705] [10.16592167 9.4671201 9.99310197 10.26246305]] spd_test(): Matrix A is SPD if x'Ax > 0 for all nonzero vectors x dif2 matrix passes SPD test #1 dif2 matrix passes SPD test #2 fibonacci matrix passes SPD test #1 fibonacci matrix fails SPD test #2 chance_test(): Normal end of execution. Thu Sep 29 16:44:44 2022