Question: Fill in the code below to calculate the sample's mean, variance, and standard deviation of a vector of numbers. Using only StatsPlots, PlutoUI, Random. Thank

 Fill in the code below to calculate the sample's mean, variance,

Fill in the code below to calculate the sample's mean, variance, and standard deviation of a vector of numbers. Using only StatsPlots, PlutoUI, Random. Thank you!

and standard deviation of a vector of numbers. Using only StatsPlots, PlutoUI,Random. Thank you! Main.workspace2. GaussianDistribution # The block of text below adddocumentation to julia struct or function. # Check out the live docs

Main.workspace2. GaussianDistribution # The block of text below add documentation to julia struct or function. # Check out the live docs to the right when your cursor # is in GaussianDistribution. GaussianDistribution (u::Float64, 0::Float64) A gaussian distribution with mean u, standard deviation o. Sample data from this distribution using 'sample(gd, n)!. You can also get the mean (mean(gd)'), standard deviation ('stddev(gd)'), and variance ('var(gd)') through their corresponding functions. II III struct GaussianDistribution u::Float64 # mean 0::Float64 # standard deviation end 031.1 ms mean (generic function with 1 method) mean(gd::GaussianDistribution) gd. 27.2 us stddev (generic function with 1 method) stddev(gd::GaussianDistribution) = gd.o 25.9 us var (generic function with 1 method) var(gd:: GaussianDistribution) = gd.o12 19.5 us sample (generic function with 2 methods) function sample (gd::GaussianDistribution, n = 1) gd.o*randn(n) .+ gd. end 24.7 us mean (generic function with 2 methods) function mean(X::Vector{Float64}) end var (generic function with 2 methods) function var (X::Vector{Float64}) end stddev (generic function with 2 methods) function stddev (X::Vector{Float64}) end Main.workspace2. GaussianDistribution # The block of text below add documentation to julia struct or function. # Check out the live docs to the right when your cursor # is in GaussianDistribution. GaussianDistribution (u::Float64, 0::Float64) A gaussian distribution with mean u, standard deviation o. Sample data from this distribution using 'sample(gd, n)!. You can also get the mean (mean(gd)'), standard deviation ('stddev(gd)'), and variance ('var(gd)') through their corresponding functions. II III struct GaussianDistribution u::Float64 # mean 0::Float64 # standard deviation end 031.1 ms mean (generic function with 1 method) mean(gd::GaussianDistribution) gd. 27.2 us stddev (generic function with 1 method) stddev(gd::GaussianDistribution) = gd.o 25.9 us var (generic function with 1 method) var(gd:: GaussianDistribution) = gd.o12 19.5 us sample (generic function with 2 methods) function sample (gd::GaussianDistribution, n = 1) gd.o*randn(n) .+ gd. end 24.7 us mean (generic function with 2 methods) function mean(X::Vector{Float64}) end var (generic function with 2 methods) function var (X::Vector{Float64}) end stddev (generic function with 2 methods) function stddev (X::Vector{Float64}) end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!