If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Classical and operant conditioning article

What is conditioning?

Conditioning is a type of learning that links some sort of trigger or stimulus to a human behavior or response. When psychology was first starting as a field, scientists felt they couldn’t objectively describe what was going on in people’s heads. However, they could observe behaviors so that’s what they focused on in their experiments. The major theories about learning come from the conclusions drawn from these experiments.

What is classical conditioning?

Imagine your favorite snack is peanut butter and jelly sandwiches. Whenever you get that snack, it makes you happy and you start to jump around, doing your happy PB&J dance. Your sandwich always comes on the same plate – it’s big and orange and has a picture of a tiger on it. Eventually, you might start doing your PB&J dance whenever you see your tiger plate on the table, in anticipation of the sandwich arriving.
Cartoon explaining what classical conditioning is.
This type of conditioning is called classical conditioning. The presence of the plate has caused you to have the same reaction as having a PB&J sandwich. The sandwich is our stimulus (the unconditioned stimulus) and it elicits the dance which is our response (the unconditioned response). “Unconditioned” refers to the fact that no learning took place to connect the stimulus and response - you saw the the sandwich and automatically got so excited you start to dance (like a reflex!).
Cartoon explaining what an unconditioned response is as well as a neutral stimulus.
The plate starts off as a neutral stimulus and elicits no reaction on its own. As it is continuously paired with the sandwich, the plate becomes a conditioned stimulus and elicits a conditioned response in the form of your happy dance. Over time, you have learned to connect the plate and the feelings of happiness that cause you to dance.
Cartoon showing how the tiger plate turns from a neutral stimulus to a conditioned stimulus over time.
Also interesting to think about is just why it is you dance when you see that sandwich in the first place. Earlier, we stated that it is was the unconditioned stimulus because it took no learning to cause you to dance at the sight of it. At the start of our thought experiment, that was true. However, when you were first introduced to PB&J, you would dance while eating it because it tasted so good. Eventually, an association between sight and taste formed (learned via classical conditioning) and you began to dance preemptively - just the sight was enough to trigger the feelings of joy expressed by the dance.. If we really follow this line of thought about our everyday actions, we’ll find that many, if not most, of our actions can be traced back to pretty basic needs like food, shelter, comfort, etc.
A cartoon showing a person expressing that they "feel like dancing" every time they see the tiger plate.

What is operant conditioning?

In classical conditioning, the stimuli that precede a behavior will vary (PB&J sandwich, then tiger plate), to alter that behavior(e.g. dancing with the tiger plate!). In operant conditioning, the consequences which come after a behavior will vary, to alter that behavior. Imagine years down the road you are still enamored of delicious PB&J sandwiches, and now are trying to teach yourself to be a good roommate. The house rule is that whoever leaves their dishes unwashed the longest has to take out the trash. You hate taking out the trash, so you develop a system - whenever you remember to wash your plate, you are allowed to surf the internet, otherwise you’re not allowed. The more dishes you wash, the more you get to procrastinate on your favorite sites. Initially, you leave the plate in the sink a few times, then you begin to remember after a day or so, and finally you start to wash your dishes immediately after using them. This process of shaping involves intermediate behaviors (leaving the plate in the sink and beginning to come back to wash the dishes within hours) that start moving you towards the goal behavior (washing your dishes immediately).
Cartoon showing three different days and how operant conditioning works in the context of washing dishes and going on the internet.

How do we influence behavior?

Operant conditioning changes behaviors by using consequences, and these consequences will have two characteristics:
  1. Reinforcement or punishment
-Reinforcement is a response or consequence that causes a behavior to occur with greater frequency.
-Punishment is a response or consequence that causes a behavior to occur with less frequency.
  1. Positive or negative
-Positive means adding a new stimulus.
-Negative means removing an old stimulus.
There end up being 4 different ways we can affect behavior with operant conditioning:
negative reinforcement-positive reinforcement
negative punishment-positive punishment
Let’s go back to our example of washing the dishes, and consider the four different types of operant conditioning based consequences. If you leave the dish on the table instead of washing it, some sort of punishment will happen because this is an undesired behavior.
  • Positive punishment: You will get a new chore such as sweeping the floors! (adding a new stimulus).
  • Negative punishment: You will not get to eat the usual apple pie dessert (removing an old stimulus)
If you remember to wash your plate, some sort of reinforcement will happen because this is a desired behavior.
  • Positive reinforcement: You will get to make one online purchase! (adding a new stimulus).
  • Negative reinforcement: You won’t have to take out the trash this week, a standard chore (removing an old stimulus).

How effective is the conditioning?

Imagine your tiger plate was one of a set of plates – jungle cat plates. There is a lion, a jaguar, and a leopard as well
Cartoon showing the different types of animal plates in the set.
They’re all generally the same shape and color, so you react to these plates the same way you reacted to the tiger plate, (the original conditioned stimulus) and do your happy dance. We call this generalization – when a conditioned response (happy dance) occurs in reaction to a stimulus (jungle cat plates) other than (but often similar to) the conditioned one (tiger plate). A good way to remember is that now you do a happy dance for cat plates in general. The opposite of generalization is discrimination - the ability to tell different stimuli apart and react only to certain ones. You show discrimination whenever you don’t dance because you can tell the difference between the peanut butter and the pickle jars, for example, or by dancing only at snack time, since you know that’s the only time the PB&J happens.
Imagine that you’ve run out of peanut butter, so you’re stuck with tuna salad for weeks (oh no!). Your parents try to make it better by serving it on your favorite tiger plate, but you soon realize the tiger plate does not mean PB&J. You lose the association between the tiger plate and PB&J, and stop doing your happy dance whenever you see that plate. We call this extinction – your conditioned response (happy dance) disappeared. However, when peanut butter in your house again and your parents serve you PB&J on your tiger plate, the previous association between the tiger plate and PB&J dance quickly will come back in full force. We call this spontaneous recovery.
While the discussion above focused on our examples from classical conditioning, the same concepts can be applied to operant conditioning as well. Maybe your chore scheme works so well you begin to wipe down the kitchen counters whenever you make a big meal, or you refuse to allow yourself pie if you haven’t folded your laundry.

What are examples of conditioning in your daily life?

Conditioning, both classical and operant, can be seen throughout our daily lives. Insurance companies will charge you more if you keep getting into accidents (negative punishment) or give you congratulatory certificates for safer driving (positive reinforcement). When driving, seeing flashing lights in your rearview mirror coupled with a siren will cause a gut feeling of dread even before the officer comes by with your ticket. Maybe it’s not even you they’re pulling over, but those signals (conditioned stimuli) are so associated with tickets and fines (unconditioned stimuli) that you can feel it in your stomach (conditioned response). Now that we’ve explored conditioning some, be on the lookout for examples in your day to day life, and maybe even consider using some of those techniques on yourself – for every hour and a half of studying, give yourself a ten minute break to stretch and watch funny videos or walk around!

Want to join the conversation?

  • leaf green style avatar for user jhorowitz3
    Isn't a company charging you more if you keep getting into accidents a positive punishment because something is being gained?
    (38 votes)
    Default Khan Academy avatar avatar for user
    • marcimus pink style avatar for user eman
      Hey J,

      The answer is 'negative punishment' because you have to define what a fine is. A fine is taking away your money. That's the negative part. The punishment park is that they're trying to decrease your behavior (i.e. getting into accidents).
      (43 votes)
  • blobby green style avatar for user Chris Sicat
    Can someone explain Positive and negative punishment better? For positive reinforcement, I connect it to a reward for good behavior; for negative reinforcement, I connect it to a thing to do so that the negative thing(bugging you) can get out of your life or disappear.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user torresyes3
      Negative=taking away
      This applies to both reinforcement and punishment but put simply: reinforcement=want behavior to increase while punishment=want behavior to decrease.

      Positive punishment means you are adding something to decrease the undesired behavior such as not paying something on time. You want the person to pay on time (desired behavior) so adding a fee (positive punishment) will hopefully get the person to pay on time next time. Negative punishment is when you remove something to decrease the undesired behavior. Removing a discount (negative punishment) that you previously received for paying on time (desired behavior) because you are now paying late (undesired behavior).
      (6 votes)
  • male robot hal style avatar for user A J
    Why wouldnt driving safely and earning certificates be a positive punishment (adding a reward after a "desired" action)?

    I understand why insurance companies taking away benefits is a negative reinforcement(removing benefits afters "undesired" actions.

    Oh nevermind, its because driving safely is what we want to "reinforce".
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Brenden
      It has to do with what a punishment/reinforcement is.

      Punishments are given whenever an undesired action occurs.
      Reinforcement is given when a desired action occurs.

      The positive/negative only refers to whether something additional is added (positive) or something is taken away (negative).
      (7 votes)
  • leaf green style avatar for user Rahul
    The example of spontaneous recovery in this article is a bit confusing for me, especially because I think it's different from what's said in the video. I thought spontaneous recovery happened randomly sometime after the extinction, but the PB&J/tiger plate example makes it seem like spontaneous recovery happens because the unconditioned stimulus was given again (in this case your parents gave you a PB&J with the tiger plate, causing you to be reconditioned).

    Which one is it— random or caused by giving the unconditioned stimulus again?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • starky tree style avatar for user Amanda  Pinzon
    I am still a little confused with a negative reinforcement. Can you please explain and give me an example?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user Nicholas Arthur Ritchie
    Two paragraphs down there are two “the’’.’’ you saw the the sandwich and automatically got so excited you start to dance (like a reflex!).’’
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Serah  Nduki
    What are the features of classical and operant conditioning
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seedling style avatar for user shah4460
    how can I APA in cite this? Who's the author?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seed style avatar for user Spring Lenox
    In this article, you use "positive punishment" and "negative punishment." I learned these as "punishment" and "reinforcement removal." Is one way more currently in favor at the moment? Have these always had differing names?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Prasiddhi shrestha
    Which conditioning would have a longer lasting effect on the brain? and why?
    (2 votes)
    Default Khan Academy avatar avatar for user