HP Forums

Full Version: Statistics: "Make Column Data" results in "Error: Syntax Error"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey!
Given a list of numbers, I've been trying to calculate the empirical cumulative distribution function for it.
I started by entering the numbers into column D1 in the "Statistics 1Var" spreadsheet.
In the 2nd column D2, I now tried calculating the eCDF by selecting the column, clicking on "Make", and entering this expression:

count(w -> w <= X, D1)

This is supposed to give me the, for every row X, the count of elements in D1 which are less than or equal to X.
I tried that both with ASCII characters, as well as → and ≤. However, I always get an "Error: Syntax Error" instead.

Using this expression directly in the CAS view works just fine.
I also managed to do the whole operation within the CAS view using
D2 = MAKELIST(count(w -> w <= X, D1), X, 1, SIZE(D1))

Is there any reason this doesn't work in the "Make Column Data" view?
Hi,

The "Statistics 1Var" "Num" view isn't really a spreadsheet even though it looks like one. You can't do things in the "Expression" part of "Make Column Data" that pulls in values from any of the other columns. Bit sad really as that would seem intuitively useful.

As you say it works doing it in the CAS view.

I believe you can setup the actual Spreadsheet view to pull columns from the Stats1Var view and put the results back and I did try playing with that once but gave up.

Cheers,
Jon.
Reference URL's