#Define the variables for prizes
totalprize <- c(1.6,1.6,2.8,10.9,18,20.7,23.8)
firstprize <- c(1, 1, 1.4, 5, 6.6, 9, 10.46)
donatedprize <- c(4* (totalprize-1.6))
year <- c(2011,2012,2013,2014,2015,2016,2017)
#plot the graph
plot (year, totalprize, xlab = "Year (2011-2017)", ylab = "Amount (Millions)",type="o", col="blue", ylim=c(0,100))
lines (year, firstprize, type="o", col="red")
lines (year, donatedprize, type="o", col="yellow")
title(main="Prize Pools from TI (2011-2017)")
print(matrix(c(donatedprize), nrow = 1, ncol= 7), byrow = FALSE)
REVISION
#Define the variables for prizes
totalprize <- c(1.6,1.6,2.8,10.9,18,20.7,23.8)
firstprize <- c(1, 1, 1.4, 5, 6.6, 9, 10.46)
#userrevenue <- c(4* (totalprize-1.6))
year <- c(2011,2012,2013,2014,2015,2016,2017)
#Generated revenue... assumes 1.6m given from valve and 25% given
rev <- function(x){
x <- 4 * (x-1.6)
return(x)
}
#User Revenue
userrev <- lapply(totalprize, rev)
#plot the graph
plot (year, totalprize, xlab = "Year (2011-2017)", ylab = "Amount (Millions)",type="o", col="orange", ylim=c(0,100))
lines (year, firstprize, type="o", col="red")
lines (year, userrev, type="o", col="blue")
title(main="Prize Pools from TI (2011-2017)")
#print calculated data
print(matrix(c(userrev), nrow = 1, ncol= 7), byrow = FALSE)
totalprize <- c(1.6,1.6,2.8,10.9,18,20.7,23.8)
firstprize <- c(1, 1, 1.4, 5, 6.6, 9, 10.46)
#userrevenue <- c(4* (totalprize-1.6))
year <- c(2011,2012,2013,2014,2015,2016,2017)
#Generated revenue... assumes 1.6m given from valve and 25% given
rev <- function(x){
x <- 4 * (x-1.6)
return(x)
}
#User Revenue
userrev <- lapply(totalprize, rev)
#plot the graph
plot (year, totalprize, xlab = "Year (2011-2017)", ylab = "Amount (Millions)",type="o", col="orange", ylim=c(0,100))
lines (year, firstprize, type="o", col="red")
lines (year, userrev, type="o", col="blue")
title(main="Prize Pools from TI (2011-2017)")
#print calculated data
print(matrix(c(userrev), nrow = 1, ncol= 7), byrow = FALSE)
REVISION II
#Define the variables for prizes
totalprize <- c(1.6,1.6,2.8,10.9,18,20.7,23.8)
firstprize <- c(1, 1, 1.4, 5, 6.6, 9, 10.46)
#userrevenue <- c(4* (totalprize-1.6))
year <- c(2011,2012,2013,2014,2015,2016,2017)
#Generated revenue... assumes 1.6m given from valve and 25% given
rev <- function(x){
x <- 4 * (x-1.6)
return(x)
}
#User Revenue
userrev <- sapply(totalprize, rev)
steammoney <- (userrev - totalprize)
#plot the graph
plot (year, totalprize, xlab = "Year (2011-2017)", ylab = "Amount (Millions)",type="o", col="orange", ylim=c(-10,100))
lines (year, firstprize, type="o", col="red")
lines (year, userrev, type="o", col="blue")
lines (year, steammoney, type="o", col="black")
title(main="Prize Pools from TI (2011-2017)")
#print calculated data
print(matrix(c(userrev), nrow = 1, ncol= 7), byrow = FALSE)
#print estimated best fit NOT FINISHED YET
lm(formula = firstprize ~ year)
#Money generated
print(paste(userrev - totalprize))