A within-subjects design is an experiment in which the same group of subjects serves in more than one treatment. Note that I’m using the word “treatment” to refer to levels of the independent variable, rather than “group”. It’s probably always better to use the word “treatment”, as opposed to group. The term “group” can be very misleading when you are using a within-subjects design because the same “group” of people is often in more than one treatment. As an example of a within-subjects design, let’s say that we are interested in the effect of different types of exercise on memory.
We decide to use two treatments, aerobic exercise and anaerobic exercise. In the aerobic condition we will have participants run in place for five minutes, after which they will take a memory test. In the anaerobic condition we will have them lift weights for five minutes, after which they will take a different memory test of equivalent difficulty. Since we are using a within-subjects design we have all participants begin by running in place and taking the test, after which we have the same group of people lift weights and then take the test. We compare the memory test scores in order to answer the question as to what type of exercise aids memory the most.