Post Reply 
storing data in a list while executing a program
06-12-2017, 02:40 PM
Post: #1
storing data in a list while executing a program
I am trying to simulate waiting on a bus that arrives at an exact schedule(in this case every 10 minutes), 5 days a week you arrive at the busstop and you notice the time in minutes that you have to wait for the bus
If you do this 500 times , the program should export a list (L2) with estimations about the exact interval for the bus to arrive at the busstop.
Hypotest(5,500) should simulte 500 weeks of waiting 5 days a week for the bus.
There must be something wrong with this program, L2 is not generated correctly?
EXPORT HypoTest(N,T)
BEGIN
PRINT();
{}▶L2;
FOR D FROM 1 TO T DO
MAKELIST(RANDINT(9),X,1,N)▶L1;
L2(D):=approx(mean(L1)*2,2);
END;
PRINT(L2);
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
storing data in a list while executing a program - Pieter - 06-12-2017 02:40 PM



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