Post Reply 
Little explorations with HP calculators (no Prime)
12-12-2017, 10:30 PM (This post was last modified: 12-12-2017 10:43 PM by pier4r.)
Post: #252
RE: Little explorations with HP calculators (no Prime)
Today, while searching for a live stream on youtube regarding Berlin, I found a peculiar stream (regarding Tempelhof). It is a stream pointed for half of the image on an highway. I realized that with the view on the highway I could investigate myself, from home, one of the questions that I had during courses at the university: whether the frequency of "arrivals" on the highway would match easily the theoretical distributions that I studied (Poisson for example).

Problem: how do I collect the data? Aside from the errors of manual collection (that more or less should be systematic) , doing it completely in a manual way won't be fast enough.

So once again the trusty calculator (50g) saves the day. With a rough but working program like the following

Code:

WHILE
  0 WAIT 102.1 ==
    @if the 0 key is pressed (10th row, 2nd column from F1. No modifiers)
REPEAT
  TIME @leave time on the stack.
END
@otherwise quit.

I could collect timings for a short while.

Then I did:
DEPTH \->LIST
to save them in a list.

After that:
4 RND
To shorten the timings to seconds.

\GDLIST (delta list)
to get the difference in seconds between entries. (it does not really work when the time distance is over 60 seconds)

Then
DUP LDDUP
to get the single values

Saving the list of values (the one done with \GDLIST ) in a variable, say TLIST1

and then having:
L1: list with delta of timestamps
1 \<< DUP TLIST SWAP LCNT \>> DOSUBS

One can get the value of how many times arrivals where within a certain amount of seconds.

But the fun part is to collect data from the stream as "relaxing" activity.
The entire process can be greatly improved, but I always think that the initial input/question can be useful (as input) when shared.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with HP calculators (no Prime) - pier4r - 12-12-2017 10:30 PM



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