November 2017
Beginner
316 pages
6h 40m
English
We will now be exploring the various simple statistical operations that can be performed in Julia, using some default built-in functions:
julia> x = [10,20,30,40,50]
5-element Array{Int64,1}:
10
20
30
40
50
# computing the mean
julia> mean(x)
30.0
# computing the median
julia> median(x)
30.0
# computing the sum
julia> sum(x)
150
# computing the standard deviation
julia> std(x)
15.811388300841896
# computing the variance
julia> var(x)
250.0
As we can see, given an array of elements, we can easily draw out basic statistical inferences from the data. However, Julia does have functions that support some cumulative operations on the data as well! These are as follows:
Read now
Unlock full access