HP Forums
Statistic 2var with frequencies - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Statistic 2var with frequencies (/thread-3284.html)



Statistic 2var with frequencies - salvomic - 03-06-2015 06:02 PM

hi all,
I want to analyze this table with Statistic 2 var:
x_i: 1, 4, 6, 16
y_i: 41, 69, 82, 84
n_i: 4, 5, 6, 5 (practically: 20 tests divided into 4 groups)
I wouldn't write every item more times.
I should get regression parameters...

Any help, please?

Thanks in advance!

Salvo


RE: Statistic 2var with frequencies - Helge Gabert - 03-06-2015 08:42 PM

I'd write a little utility program, something like this:

EXPORT UTIL1()
BEGIN
LOCAL k,j,n,m;
n:=SIZE(C3); // frequencies in C3
FOR m FROM 1 TO n DO
k:=C3(m);
FOR j FROM 1 TO k-1 DO
C1:=CONCAT(C1,C1(m)); // x_i in C1
C2:=CONCAT(C2,C2(m)); // y_i in C2
END;
END;
END;

and then analyze the data {C1, C2} in the stat 2var app.


RE: Statistic 2var with frequencies - salvomic - 03-06-2015 09:13 PM

(03-06-2015 08:42 PM)Helge Gabert Wrote:  I'd write a little utility program, something like this:

EXPORT UTIL1()
...
and then analyze the data {C1, C2} in the stat 2var app.

thank you!
it works... only two little typo (parenthesis closed at the end of concat() function:
Code:

EXPORT UTIL1()
BEGIN
LOCAL k,j,n,m;
n:=SIZE(C3); // frequencies in C3
FOR m FROM 1 TO n DO
k:=C3(m);
FOR j FROM 1 TO k-1 DO
C1:=CONCAT(C1,C1(m)); // x_i in C1
C2:=CONCAT(C2,C2(m)); // y_i in C2
END;
END;
END;

We could also add a function to reset data to only those with frequencies, to restart analysis...
However it's ok also so.

Thanks again


RE: Statistic 2var with frequencies - Helge Gabert - 03-06-2015 10:12 PM

Thanks for the typo correction!