Post Reply 
Statistics: "Make Column Data" results in "Error: Syntax Error"
02-19-2024, 10:11 PM
Post: #1
Statistics: "Make Column Data" results in "Error: Syntax Error"
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?
Find all posts by this user
Quote this message in a reply
02-22-2024, 08:32 PM
Post: #2
RE: Statistics: "Make Column Data" results in "Error: Syntax Error"
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.

10C, 11C, 12C, 15C LE, 15C CE, 16C, 21, 32S 50th aniv., 32Sii, 35 v4, 35S, 42S, 97, Prime G1
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)