Post Reply 
x’ forecast only on HP-32E
06-20-2023, 03:04 AM
Post: #1
x’ forecast only on HP-32E
Hi all.

I’m wondering why the x’ statistical forecast function was omitted on most models except the 32E for example.
Find all posts by this user
Quote this message in a reply
06-20-2023, 05:11 AM
Post: #2
RE: x’ forecast only on HP-32E
Not quite true. The "x hat" (AKA "x forecast" and "estimate x") function is also found in the HP 10B, 10BII, 10C, 12C, 14B, 17B, 17BII, 17BII+, 18C, 19B, 19BII, 19BII+, 20S, 21S, 22S, 27S, 28C, 28S, 30S, 32S, 32SII, 33E, 33C, 33S, 38E, 38C, 38G, 39G, 39G+, 39GS, 40G, 40G+, 40GS, 42S, 48S, 48SX, 48G, 48G+, 48GX, 49G, 49G+, 50G... and maybe others I'm forgetting. Smile

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-20-2023, 05:22 AM
Post: #3
RE: x’ forecast only on HP-32E
(06-20-2023 05:11 AM)Joe Horn Wrote:  Not quite true. The "x hat" (AKA "x forecast" and "estimate x") function is also found in the HP 10B, 10BII, 10C, 12C, 14B, 17B, 17BII, 17BII+, 18C, 19B, 19BII, 19BII+, 20S, 21S, 22S, 27S, 28C, 28S, 30S, 32S, 32SII, 33E, 33C, 33S, 38E, 38C, 38G, 39G, 39G+, 39GS, 40G, 40G+, 40GS, 42S, 48S, 48SX, 48G, 48G+, 48GX, 49G, 49G+, 50G... and maybe others I'm forgetting. Smile

My amnesia must be kicking in. Thanks!
Find all posts by this user
Quote this message in a reply
06-20-2023, 12:56 PM
Post: #4
RE: x’ forecast only on HP-32E
(06-20-2023 05:11 AM)Joe Horn Wrote:  Not quite true. The "x hat" (AKA "x forecast" and "estimate x") function is also found in the HP 10B, 10BII, 10C, 12C, 14B, 17B, 17BII, 17BII+, 18C, 19B, 19BII, 19BII+, 20S, 21S, 22S, 27S, 28C, 28S, 30S, 32S, 32SII, 33E, 33C, 33S, 38E, 38C, 38G, 39G, 39G+, 39GS, 40G, 40G+, 40GS, 42S, 48S, 48SX, 48G, 48G+, 48GX, 49G, 49G+, 50G... and maybe others I'm forgetting. Smile

I always thought it was kind of odd they included it on the 12C but not the 11C or 15C.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-20-2023, 09:12 PM
Post: #5
RE: x’ forecast only on HP-32E
(06-20-2023 12:56 PM)Dave Britten Wrote:  I always thought it was kind of odd they included it on the 12C but not the 11C or 15C.

"Life is short and ROM is full."
- Bill Wickes

But also there aren't extra key assignments available on the 11C and 15C. That's why the 15C had to move all but two of the number comparisions into "g TEST <n>" sequences.

It's easy enough to write a subroutine to do it on the 11C and 15C. Swap two pairs of statistics registers (R3 with R5, R4 with R6), compute the y linear estimate, swap back. On the 15C this can be fairly conveniently done in the subroutine without disturbing the stack with a sequence of "x <>" instructions.
Find all posts by this user
Quote this message in a reply
06-21-2023, 01:15 AM
Post: #6
RE: x’ forecast only on HP-32E
(06-20-2023 09:12 PM)brouhaha Wrote:  
(06-20-2023 12:56 PM)Dave Britten Wrote:  I always thought it was kind of odd they included it on the 12C but not the 11C or 15C.

"Life is short and ROM is full."
- Bill Wickes

But also there aren't extra key assignments available on the 11C and 15C. That's why the 15C had to move all but two of the number comparisions into "g TEST <n>" sequences.

It's easy enough to write a subroutine to do it on the 11C and 15C. Swap two pairs of statistics registers (R3 with R5, R4 with R6), compute the y linear estimate, swap back. On the 15C this can be fairly conveniently done in the subroutine without disturbing the stack with a sequence of "x <>" instructions.

Just to clarify, I would be swapping Σx & Σy. Right?
Find all posts by this user
Quote this message in a reply
06-21-2023, 03:19 AM
Post: #7
RE: x’ forecast only on HP-32E
(06-21-2023 01:15 AM)Matt Agajanian Wrote:  
(06-20-2023 09:12 PM)brouhaha Wrote:  It's easy enough to write a subroutine to do it on the 11C and 15C. Swap two pairs of statistics registers (R3 with R5, R4 with R6), compute the y linear estimate, swap back. On the 15C this can be fairly conveniently done in the subroutine without disturbing the stack with a sequence of "x <>" instructions.

Just to clarify, I would be swapping Σx & Σy. Right?

Yes, but also swapping Σx² & Σy².

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-21-2023, 04:07 AM
Post: #8
RE: x’ forecast only on HP-32E
(06-21-2023 03:19 AM)Joe Horn Wrote:  
(06-21-2023 01:15 AM)Matt Agajanian Wrote:  Just to clarify, I would be swapping Σx & Σy. Right?

Yes, but also swapping Σx² & Σy².

Excellent. Thank you.
Find all posts by this user
Quote this message in a reply
06-21-2023, 07:09 AM (This post was last modified: 06-21-2023 07:12 AM by Namir.)
Post: #9
RE: x’ forecast only on HP-32E
If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

My 2 cents worth!

Namir
Find all posts by this user
Quote this message in a reply
06-21-2023, 11:36 AM
Post: #10
RE: x’ forecast only on HP-32E
(06-21-2023 07:09 AM)Namir Wrote:  If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

My 2 cents worth!

Namir

So as long as I'm sloppy and inaccurate with my x measurements, then I'm okay? Big Grin
Visit this user's website Find all posts by this user
Quote this message in a reply
06-21-2023, 01:59 PM (This post was last modified: 06-21-2023 02:01 PM by rawi.)
Post: #11
RE: x’ forecast only on HP-32E
Namir wrote:
Quote:If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

Strictly speaking, it is not a forecast of x, but it answers the question: What x will result in a forecast of a given y?
Find all posts by this user
Quote this message in a reply
06-21-2023, 10:36 PM
Post: #12
RE: x’ forecast only on HP-32E
(06-21-2023 01:59 PM)rawi Wrote:  Namir wrote:
Quote:If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

Strictly speaking, it is not a forecast of x, but it answers the question: What x will result in a forecast of a given y?

I got what you mean. Just so I can understand the mathematics behind that, in what way is this method not a forecast?

Thanks
Find all posts by this user
Quote this message in a reply
06-22-2023, 10:53 AM
Post: #13
RE: x’ forecast only on HP-32E
(06-21-2023 11:36 AM)Dave Britten Wrote:  
(06-21-2023 07:09 AM)Namir Wrote:  If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

My 2 cents worth!

Namir

So as long as I'm sloppy and inaccurate with my x measurements, then I'm okay? Big Grin

Dave,

If there are errors in measuring x and y then one needs a different set of equations to calculate the slope and intercept--the Demming regression! :-)

Namir
Find all posts by this user
Quote this message in a reply
06-22-2023, 10:57 AM (This post was last modified: 06-22-2023 10:58 AM by Namir.)
Post: #14
RE: x’ forecast only on HP-32E
(06-21-2023 01:59 PM)rawi Wrote:  Namir wrote:
Quote:If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

Strictly speaking, it is not a forecast of x, but it answers the question: What x will result in a forecast of a given y?

I hear you ... perhaps slightly more accurately put .... What x will result in a forecast of a given projected value of y.

BTW .. I am not a statistitcian (by education) ... although I spend a lot of time tinkering with curve fitting ... and probably committing an untold number of statistical herressies that would justify my burning at the stake!

Namir
Find all posts by this user
Quote this message in a reply
06-22-2023, 12:05 PM
Post: #15
RE: x’ forecast only on HP-32E
Namir wrote:
Quote:I got what you mean. Just so I can understand the mathematics behind that, in what way is this method not a forecast?

The point is that x influences y. Normally x can be set (e.g. advertising spendings, price) or you can wait for a certain x (if x is time) and then you get for this x a forecast of y with a mean (normally used as the forecast), an error distribution (normally assumed to be normally distributed with a standard deviation for which formulas exist). This error distribution is essential for a forecast. For example, from this you can get a 95% confidence interval for your forecast.

If you use a given value of y to estimate for which x you will get the mean forecast of this specific y you just get a single value for x, no distribution information, no standard deviation. Therefore it is not possible to compute a confidence interval. You cannot set y and then get x, it's vice versa.
Find all posts by this user
Quote this message in a reply
06-22-2023, 12:22 PM
Post: #16
RE: x’ forecast only on HP-32E
(06-22-2023 12:05 PM)rawi Wrote:  Namir wrote:
Quote:I got what you mean. Just so I can understand the mathematics behind that, in what way is this method not a forecast?

The point is that x influences y. Normally x can be set (e.g. advertising spendings, price) or you can wait for a certain x (if x is time) and then you get for this x a forecast of y with a mean (normally used as the forecast), an error distribution (normally assumed to be normally distributed with a standard deviation for which formulas exist). This error distribution is essential for a forecast. For example, from this you can get a 95% confidence interval for your forecast.

If you use a given value of y to estimate for which x you will get the mean forecast of this specific y you just get a single value for x, no distribution information, no standard deviation. Therefore it is not possible to compute a confidence interval. You cannot set y and then get x, it's vice versa.

Couldn't you just find the minimum and maximum values of x for which the given value of y falls within a 95% confidence interval? (Disclaimer: I am not a statistician.)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-24-2023, 12:37 AM
Post: #17
RE: x’ forecast only on HP-32E
(06-22-2023 12:05 PM)rawi Wrote:  Namir wrote:
Quote:I got what you mean. Just so I can understand the mathematics behind that, in what way is this method not a forecast?

The point is that x influences y. Normally x can be set (e.g. advertising spendings, price) or you can wait for a certain x (if x is time) and then you get for this x a forecast of y with a mean (normally used as the forecast), an error distribution (normally assumed to be normally distributed with a standard deviation for which formulas exist). This error distribution is essential for a forecast. For example, from this you can get a 95% confidence interval for your forecast.

If you use a given value of y to estimate for which x you will get the mean forecast of this specific y you just get a single value for x, no distribution information, no standard deviation. Therefore it is not possible to compute a confidence interval. You cannot set y and then get x, it's vice versa.

Excelllent! Well stated!!
Find all posts by this user
Quote this message in a reply
06-24-2023, 02:32 PM
Post: #18
RE: x’ forecast only on HP-32E
Dave Britten wrote:
Quote:Couldn't you just find the minimum and maximum values of x for which the given value of y falls within a 95% confidence interval?
This would be possible if the x-variable had an distribution like the y-variable. But it has not. For instance x can be a time variable like a year. If there is an increasing trend a lower y would lead to a lower x, in this case to the beginning of the year. It easily can be that due to saisonality in the beginning of the year there is a higher y than in the middle of the year. So this does not make sense.
Find all posts by this user
Quote this message in a reply
06-24-2023, 02:48 PM
Post: #19
RE: x’ forecast only on HP-32E
(06-21-2023 07:09 AM)Namir Wrote:  If I rmember my summer stat course in 1979, classical linear regression is supposed to be used to predict y ONLY because the values of y can have errors while the values of x are error free. So predicting x for given y is a statistical heressy!! I mean you can still calculate x', but don't write home about it!

My 2 cents worth!

Namir

Sounds like decided that the x values are perfect was 100% confident about their x-data.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-24-2023, 04:43 PM
Post: #20
RE: x’ forecast only on HP-32E
Based upon other calculators, I believe that if one forecasts y, and then uses the forecasted y value to now forecast x, one will get the original x value returned.
Find all posts by this user
Quote this message in a reply
Post Reply 




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