Saturday, March 11, 2023

Casio fx-CG50: Plotting the Betting Equation

Casio fx-CG50:  Plotting the Betting Equation



Introduction


The program BETPLOT plots two equations:


The betting equation, based on logistic equation:


y1(x) = p(x) = 1 / (1 + α*x^β)


α, β:  parameters

x:  data point, odds given by the booker

p(x):  probability, probability that a favorite event happens/wins



The expected profit equation:


y2(x) = p(x) * x - (1 - p(x))



Casio fx-CG 50 Program:  BETPLOT


The characters α, β, and # are found in the CHAR sub menu (outside of the PRGM menu).  If you have a monochrome calculator or just don't want color, ignore the color commands.


The program then graphs the resulting equation.   The variables Y1 and Y2 (with the bold Y) represent functions of X.  

 

"BETTING EQN."

"DAVID SUMPTER"

Red "1÷(1+αX^β)"◢

"INCREMENT"?→1

"# STEPS"?→S

"α"?→A

"β"?→B

"(1+A×X^B)^-1"→Y1

"X×Y1-(1-Y1)"→Y2

Y=type

SetG-Color Black, 1

SetG-Color Green, 2

Seq(K,K,0,S×I+I,I)→List 1

(1+A×List 1^B)^-1→List 2

List 2×List1-(1-List 2)→List 3

ClrText

"COL. 1: X"

"COL. 2: P(X)"

"COL. 3: EXP. WIN"◢

List→Mat(List 1,List 2,List 3)◢ 

ViewWindow 0,S×I,I,Min(List 2)-1,Max(List 2),0.25

AxesOn

GridOn

DrawGraph



Examples


Example 1:

α = 1.3, β = 1.01





Example 2:

α = 1.16, β = 1.25






Source:


Sumpter, David.  The Ten Equations That Rule the World: And How You Can use Them Too.  Flatiron Books: New York.  2021.  ISBN 978-1-250-24696-7



Eddie



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...