options(scipen=999)
options(digits=10)
cat("\014") # clear screen
rm(list=ls(all=TRUE))


g=function(x,p) p*(1-p)^(x-1)
g(1,0.25)
g(2,0.25)
g(3,0.25)

x=seq(from=1,to=5,by=1)
Px=g(x,0.25)
table=data.frame(x,Px)
table

