Closed PavelVBushmakin closed 1 year ago
It is calculated in the example two above above in the same chapter
mean=g.V().hasLabel('airport').values('runways').mean().next()
1.4309425014819206
I should probably add an example that does the whole thing in one query.
gremlin> g.V().hasLabel('airport').
......1> values('runways').fold().as('runways').
......2> mean(local).as('mean').
......3> select('runways').unfold().
......4> math('(_-mean)^2').mean().math('sqrt(_)')
==>0.7510927827902234
gremlin>
Closing as this is fixed and work has now started on the second edition. There will likely be one final release of the v283 first edition line before the V2 branch becomes the second edition. That release will include these fixes.
3.29.6. Calculating a standard deviation