Post Reply 
Election predictions
11-06-2020, 03:48 PM
Post: #6
RE: Election predictions
These are the formulas I've been using to do quick napkin calculations for catch-up votes required. Probably essentially the same as what everyone else is using.

Inputs

A = Current votes for leading candidate
B = Current votes for trailing candidate
C = Current total votes for other candidates
Vr = Estimated percent of votes reported

Calculations

T: Total votes counted = A+B+C
R: Votes remaining to be counted = T*(1-Vr)/Vr
Vp: Percent of remaining votes needed for trailing candidate to tie = 1-(B+R-A)/(2*R)
Vn: Votes needed for trailing candidate to tie = R*Vp

This assumes that 100% of the outstanding votes will be for either the leading or trailing candidate, which provides a worst-case-scenario estimate for the votes the trailing candidate needs (i.e. playing it safe).

HP 42S version

Code:
LBL "CATCH"
INPUT "A"
INPUT "B"
INPUT "C"
INPUT "VR%"
RCL "A"
RCL+ "B"
RCL+ "C"
1
RCL "VR%"
%
-
LASTX
/
*
ENTER
RCL+ "B"
RCL- "A"
2
/
RCL/ ST Y
1
-
+/-
ENTER
RCL* ST Z
100
STO* ST Z
RDown
END

Input values for A, B, C, and Vr.

Results returned to the stack:

z: R (Votes remaining)
y: Vp (Percent of votes needed by trailing candidate)
x: Vn (Votes needed by trailing candidate)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Election predictions - David Hayden - 11-05-2020, 05:03 PM
RE: Election predictions - mfleming - 11-05-2020, 08:16 PM
RE: Election predictions - David Hayden - 11-06-2020, 12:37 AM
RE: Election predictions - Albert Chan - 11-06-2020, 02:03 PM
RE: Election predictions - Dave Shaffer - 11-07-2020, 02:20 PM
RE: Election predictions - Albert Chan - 11-06-2020, 11:57 AM
RE: Election predictions - Dave Britten - 11-06-2020 03:48 PM
RE: Election predictions - Dave Britten - 11-07-2020, 02:52 PM
RE: Election predictions - robve - 11-08-2020, 07:52 PM
RE: Election predictions - Dave Britten - 11-08-2020, 08:15 PM
RE: Election predictions - robve - 11-09-2020, 06:23 PM
RE: Election predictions - StephenG1CMZ - 11-09-2020, 07:53 AM
RE: Election predictions - Dave Britten - 11-09-2020, 12:35 PM



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