Study for the Society of Actuaries (SOA) PA Exam. Master key concepts with flashcards and practice questions, complete with hints and detailed explanations. Prepare effectively for success!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What R function is used to assess frequencies between two factor variables?

  1. geom_boxplot

  2. table

  3. summary

  4. lm

The correct answer is: table

The function used to assess frequencies between two factor variables is indeed the table function. This function creates a contingency table, which displays the frequency distribution of the variables in question. By providing a two-way table, it allows you to observe how the levels of one factor variable correspond with those of another. This is particularly useful in statistical analysis and exploratory data analysis, as it helps to identify relationships and patterns between categorical variables. For example, if you have two categorical variables, such as gender and preference for a product, using the table function will summarize the counts of each combination of categories, enabling further analysis of any associations between them. The other functions listed, such as geom_boxplot, summary, and lm, serve different purposes in data analysis. Geom_boxplot is used for creating box plots to visualize the distribution of continuous data, summary provides a summary of statistical measures for data objects, and lm is used for fitting linear models. These functions do not focus specifically on assessing the frequencies of two categorical variables like the table function does.