My data table which has 60 records* 3 fields, where:
Each record represents a time stamp (t=1 till t=60)
For each time stamp, we have 2 fields- the count of successes and failures based on roughly 500 turns.
e.g.,
for t =1, there are 430 successes and 70 failures
For t =2, there are 410 successes and 80 failures, and so on.
I aim to:
1.Create & visually compare the density functions for the 60 timestamps in a single plot.
2.Compute to probability of the true success rate being >=0.85 for each t.
How do I do this for all timestamps at one go in R , without having to run the same functions (see below) 60 times?
Example with a single case t=0 which has 430 successes and 70 failures
# Plot of β density for t=0
v1<- seq(0, 1, by=0.01)
beta_t1<- dbeta(v1, 431, 71)
plot(v1, beta_t1,
type = "l")
# Probability of true success rate to be 85% or higher when t=0
1-(pbeta(0.85,431,71))