How to code human behavior: Guide for behavioral coding

In the late 1960s, the US Department of Health, Education, and Welfare released a drily-titled book that would slowly change the future of behavioral science. Written by Charles Cannel and colleagues, the book was born out of increased awareness of how bias can interfere with an accurate understanding of human behavior [1].

After noting that interviews about alcohol were apparently skewed depending on whether the interviewer was a “prohibitionist” or a “socialist”, they set out to add some rigor to interview methodology, and the first behavioral coding scheme was born.

The rules they developed were designed to remove subjectivity from the interview process by formalizing a coding system for interviewer performance – researchers would no longer have to blindly trust the process. Later iterations would develop this further to the entire interview or observation process.

What is behavioral coding

What exactly is a behavioral coding scheme? Behavioral coding is the practice of formally and systematically defining overt (observable) behaviors. It takes an action, such as a furrowed brow, a raising of an arm, a look of worry, and gives it a value. It benefits the researcher by giving them a method to objectively define overt, complex behaviors that are otherwise too ambiguous to be detected by software.

Check out: How to do behavioral coding in iMotions

Once behavioral researchers have observed and quantified the behavior of participants in natural environments, they can count the instances of each action and form an objective understanding of a set of behaviors. It allows behavioral observation to be a science, and not just an art.

Below, we’ll go through the steps required in setting up your own behavioral coding scheme, and how iMotions can help you with behavioral coding experiments and beyond.

How to perform behavioral observation coding

The first step in researching overt behaviors is to define which overt behaviors you are interested in, and which are relevant to your study. It can help to explore previous research to see if a behavioral coding scheme has already been created and validated – this might be a rare occurrence depending on the field you work in, but can move the project along a lot faster if it exists.

If you have to create your own behavioral coding scheme there are several questions that can be helpful to ask at the outset, such as:

How can the behavior best be defined?

Are you interested in how a person emotionally responds to a stimulus, or their general demeanour? Perhaps you’re interested in subtle body language changes, or facial expressions. You’ll need to decide if you’re interested in broad behavioral states, or discrete instances of actions. It is also possible to combine these measures, although will of course require more work with the analysis.

It’s also important here to ensure that the categorization of the behaviors is neither too broad, nor too narrow. You’ll want to ensure that it’s clear when a behavior is or isn’t occurring, while also ensuring that the behavior is likely to be observed given the experimental context.

computer screen displaying the face of a participant with the facial grid and points

Will you carry out micro- or macrocoding?

The above question will largely determine the direction you take in terms of coding style. Microcoding involves recording small and unambiguous actions, such as parts of speech, hand movements, or looking in a certain direction. This approach is laborious, but can provide you with rich data that is clearly identified.

Macrocoding involves defining a broader state – for example, a person’s emotional state, if they are attentive to instructions, or seek out information. The analysis of macrocoding can be carried out much more quickly than microcoding (although more on this below), but can still be subjective if not restricted enough.

iMotions FEA interface

How will the behaviors be quantified?

Will you be recording singular instances of behaviors, or do you also want to record the intensity of the behavior? It might make sense to differentiate on the basis of the strength of the behavior, yet in other cases this could simply be impractical or require too much work and offer little insight. This determines whether the data will be nominal / categorical (e.g. “A” for moving towards an object, “B” for moving away, etc), or continual / rating (e.g. “A1” for immediately moving towards the object, “A2” for moving at a normal pace towards the object, etc).

You might also be interested in sequences of behaviors (i.e. sequential coding), and will need to define a new coding system for this. For example, a participant looking at a stimulus after talking to the researcher could be coded differently to when they do this independently – or this information could be deemed to be unimportant and the actions could be coded separately.

When do the behaviors stop?

This is particularly important if examining measures of broader behavioral states – can these behaviors overlap with others, or do they have a discrete ending? It’s worthwhile thinking about how potentially smaller, discrete behaviors could be impacted by broader states as well, if taking this approach.

What equipment do you need?

One of the central issues with behavioral observation is that participants are typically reactive to the presence of another person, such as the researcher [2]. This means that they are likely to modify their behavior from what it would be in an environment with high ecological validity, in response to the observation [3].

It’s therefore important to remain out of the way of the participants as much as possible, to avoid, for example, social desirability effects skewing the results [4]. This is typically done by recording through a webcam and analyzing the footage at a later time. This has the added advantage of allowing the behaviors to be screened repeatedly to ensure data accuracy.

Facial Expression Analysis Woman on a bench in a park holding a smartphone with facial expression analysis grid on her face

How to plan behavioral observation study

As with any experiment, good planning is a must. After identifying and defining the behaviours of interest, you’ll need to design an experiment that allows for studying these behaviors within an experimental setting.

For behavioral coding experiments, it’s particularly important to design an experiment that will likely elicit the behaviors that you want to see (although this might not be possible every time).

For example, if you are interested in consumer responses to a product, you might want to have the product available so that you can track the direct reactions to it. You might be interested in their emotional responses, their body language, or how they physically interact with the product – all of which can be more easily tied to the product if it’s present in the experiment. How you set up the experiment though will of course depend on the specific goals of your research.

Check out: How to do Product testing: In-Store Shelf Testing

It’s also crucial to define a time limit for the study duration, and keep it consistent across participants. This ensures that the experiences of participants can be more readily compared with each other.

Finally, it’s always good to discuss the plans with colleagues, and to gather information about what typically does and doesn’t work in such settings. Having as much information as possible allows you to prepare for any unexpected outcomes.

Behavioral Coding Pilot study

After you’ve carried out all of the above it’s of course tempting to dive right in to testing a large batch of participants, however it’s always worth carrying out a small trial run first to test how things work. While budgets and time constraints might limit how much testing can take place before the real experiment, even quick tests can help gather crucial information about the process before it’s rolled out to a wider group of participants.

This stage allows you to examine if the behaviors of interest arise, if the coding scheme is sufficient to gather the data you’re after, and sort out any issues that can occur with equipment or logistics (such as the placement of the webcam, or the greeting of participants).

This is also a good opportunity to reflect on the data collection using the coding scheme. Is it objective enough that it can be followed by other researchers without any hiccups, and would they find the same results from the same data?

Ideally, the behavioral coding should be carried out by two (or more) people, so that the consistency across the coding can be checked. For academic research, it is likely a necessity to have such checks built into the data collection process, but for those looking to get answers as rapidly as possible, it may be more in your interest to use the coding of a single person. A rule of thumb is that at least 80% of the coding should be the same across coders, although this can vary [5].

Once you’ve tested (and maybe even retested) the experiment, it’s time to implement the protocol on a larger group of participants. Having the data recorded (of course with participant consent) means that you can go back and re-analyze the data if needed.

Read: How Business can Quantify User Experience

How to analyze and gather behavioral data

There are many ways in which behavioral coding can be carried out in iMotions, including the possibility to either collect data and annotate with a coding scheme after recording, or to live-annotate the data as it comes in. It’s possible to record from video, screen-recordings, from webcam feeds and more. Survey data can also be collected within the software, and the API can also be used to connect other datastreams or tools that might be relevant to your research.

The iMotions annotation tool is designed for coding moments within the experiment. Hotkeys can be made for each designated action depending on your needs, and simply entered as the behavior occurs within the recording, or as it happens live.

Let’s talk!

There are a range of tools available for making behavioral coding as easy as possible within the software, presented in more detail within our blog post here: How To Do Behavioral Coding in iMotions.

One of the biggest advantages of the iMotions software is the ability to connect one, or multiple, biosensors into your experiment. This can also help reduce the burden of the behavioural coding.

Facial expression analysis for example can handle instances of discrete facial expressions (such as brow furrow, or wide eyes), or more general emotional expressions (such as joy, or anger).

Eye trackers can also provide detailed information about attentional processes, and fEMG can give data about movements of the body. This data can supplement or help corroborate the output of the behavioral coding scheme.

However you decide to carry out your behavioral coding, it helps to plan and be prepared. Behavioral coding can offer insights into behaviors that are only possible to detect with the human eye, and to understand humans at their most complex. For that reason it is one of the most powerful tools available to human behavior researchers, even sixty years on from its quiet beginning.

Free 52-page Human Behavior Guide

For Beginners and Intermediates

  • Get accessible and comprehensive walkthrough
  • Valuable human behavior research insight
  • Learn how to take your research to the next level


[1] Cannell CF, Fowler FJ, Jr., Marquis KH. The influence of interviewer and respondent psychological and behavioral variables on the reporting in household interviews. Vital Health Stat 1 1968; 2: 1–65.

[2] Chorney, J. M., McMurtry, C. M., Chambers, C. T., & Bakeman, R. (2015). Developing and modifying behavioral coding schemes in pediatric psychology: a practical guide. Journal of pediatric psychology, 40(1), 154–164.

[3] Harris F C, Lahey B B. Subject reactivity in direct observational assessment: A review and critical analysis. Clinical Psychology Review. 1982;2:523–538

[4] Kazdin A E. Observer effects: Reactivity of direct observation. New Directions for Methodology of Social and Behavioral Science. 1982;14:5–19.

[5] Bakeman R, Quera V. Sequential analysis and observational methods for the behavioral sciences. New York, NY: Cambridge University Press; 2011.

About the author

See what is next in human behavior research

Follow our newsletter to get the latest insights and events send to your inbox.