The example experiment we've been describing is a type of measured-response experiment, in which a numeric response variable (plant height) is measured in relation to a manipulated, independent treatment variable (temperature) that, in our case, is handled as a discrete numeric variable or ordinal categorical variable.
An example of an experiment in which the response variable is a categorical variable is a choice experiment. Here, organisms such as insects or mice are presented with two or more categories of, say, food, to choose from. With categorical variables, what is measured and analyzed is the frequency of the different categories. For example, consider the a priori hypothesis that mice prefer high-protein food over low protein and high fibre foods. One could implement a single choice experiment in which 20 individual female mice (of similar age and health) were each independently provided 2 minutes within an experimental "arena" (the apparatus) to make a choice between the 3 food types. Across these 20 independent "trials", the researcher tallies the frequency with which each category of food is chosen. In this example, the dependent variable is "food type", and there is no independent variable.
If our a priori hypothesis had been that female mice show a preference for high protein foods whereas males do not, then we could have randomly selected 20 male mice and 20 female mice to undergo the same type of choice experiment. In this case, the "sex" of the mouse would be the independent, nominal categorical variable, and "food type" would be the nominal categorical dependent variable.