Admissiom prob Percent

Hi,
I have a column "gre_class " containing categorical variables LOw,Medium & High.
I also have another column called admit containing values (0,1)
image

O means student is not admitted,1 means student gets admitted.
How do I find out the admission probability percentage pertaining to each categorical variable

Do I need to use gRoup By in R?

If the data frame is named DF, you can use

library(dplyr)
AdmitStats <- DF %>% group_by(gre_class) %>%
   summarize(AdmitFrac = mean(admit))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.