I'm looking to work out a function to calculate the likelihood of a certain combination for B and R. The current illustration of the data looks like so:
ggplot(df, aes(R,B)) +
geom_bin2d(binwidth = c(1,1))
Is there a way to calculate the probabilities of each combination (e.g. R = 23, B = 30) based on these two discrete correlated variables that are positively skewed?
Could it be possible to use the stat_density_2d to solve or could there be a better way?
Thanks.