Values

Values

Values (in a dataset)

Values are the specific entries recorded for each case (row) on a given variable (column) in a dataset. A value represents the observed measurement, category, or state of that variable for an individual case.

In other words, if a variable is the question you’re asking (e.g., “What is the student’s thumb length?”), then the value is the answer for a particular case (e.g., 65 mm).

Types of values

Values depend on the type of variable:

  • Numeric (quantitative) values: Represent measurable quantities.

    • Example: 65 (thumb length in mm), 3.2 (GPA), 120 (heart rate)

  • Categorical (qualitative) values: Represent group membership or labels.

    • Example: "male", "female", "nonbinary" (gender)

    • Example: "control" vs "treatment" (experimental group)

Examples in context

Suppose we have a dataset of students:

case_id

thumb_length_mm

gender

study_group

1

65

female

control

2

72

male

treatment

3

68

female

treatment


  • The value of thumb_length_mm for case 1 is 65

  • The value of gender for case 2 is "male"

  • The value of study_group for case 3 is "treatment"


Each cell in the table contains a value.

Values in R

In R, values are stored inside vectors (columns of a dataset):


thumb_length_mm <- c(65, 72, 68)

gender <- c("female", "male", "female")

study_group <- c("control", "treatment", "treatment")


You can access values using indexing:

thumb_length_mm[1]   # 65

gender[2]            # "male"

Values in modeling

Values are the raw inputs used to build statistical models:

  • Predictor (explanatory) variable values are used to explain variation in an outcome.

  • Outcome variable values are what the model tries to predict.


Example (linear model in R):

model <- lm(thumb_length_mm ~ gender, data = Fingers)


Here:
  • The values of thumb_length_mm are the response

  • The values of gender help explain differences in thumb length

Key idea

A dataset is fundamentally a collection of values organized by variables (columns) and cases (rows). Understanding values—and their types—is essential for data cleaning, visualization, and modeling.




    • Related Articles

    • univariate distribution

      Univariate distribution is the pattern of variation in the values of a single variable.
    • bivariate distribution

      Bivariate distribution is the pattern of variation in the values of two variables.
    • uniform distribution

      In uniform distribution, the number of observations is evenly distributed across the possible values.
    • unimodal distribution

      In unimodal distribution, most values are clustered in the center, with tails going out to either side.
    • histogram

      Histogram is a visualization where the x-axis represents the values of the variable while the y-axis represents frequency; the height of a bar in a histogram represents how many cases have that range of values.