standard-deviation function returns error in Lisp-Stat
Asked Answered
B

1

5

I'm a complete newbie to Lisp-Stat, and I started working through the tutorial at https://lisp-stat.dev/docs/tutorials/basics, but when I type

(standard-deviation purchases)

(with purchases defined as a list of integers as in the tutorial), I get the error:

#<STANDARD-GENERIC-FUNCTION DISTRIBUTIONS:STANDARD-DEVIATION (1)> when called with the arguments ...

after which it repeats the list referenced by purchases. It gives me the same thing if I use some floating-point numbers as well.

I'm using SBCL in SLIME on Ubuntu 22.04.

Any help would be greatly appreciated! Many thanks!

Blizzard answered 13/1, 2023 at 3:50 Comment(0)
M
6

This is a documentation bug, now fixed. Use standard-deviation to obtain the standard deviation of a distribution, and sd to obtain the standard deviation of a sample. We should probably consolidate these two into a single generic function.

Also, although you can get an answer from any channel, for doc bugs and tutorial specific things it's probably easier to raise a github issue. You can do that from within the documentation using the links at the top right of the page. That way they'll be tracked.

Mccarley answered 13/1, 2023 at 5:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.