Background: I'm running a project to look at which auditory features predict people's reactions to contour tones. I used both unidirectional tones (e.g., a rising tone starts at 100hz and ends at 300hz ) and bidirectional tones (e.g., a tone starts at 100hz, rises to 300hz, and then falls to 150hz).

The plan for data analysis is to build a linear model that includes the auditory features of stimuli and see to what extent those features explain participants' behavioral data.

My question: One feature I'm interested in is the slope of the fundamental frequency of each tone. It's easy to calculate that for unidirectional tones. However, is there any solution to calculate the slope for the bidirectional ones?

I once considered labeling them categorically, but doing this loses the distinction between each stimulus within one category, which is not favorable to the purpose of my project.

Many thanks for reading my question. I would highly appreciate it if anyone would like to offer any help!

  • the easiest way would probably be to model the bidirectional tone as two unidirectional tones, and calculate the slope of each separately. If you want more information than that you'll need to calculate the derivative
    – Tristan
    Sep 22, 2023 at 12:46
  • @Tristan Thanks for your answer! Derivative is something I didn't think before. I agree it can be useful to trace the change of slope, particularly when the target variable is with high time resolution. But for calculating the slope separately, I'm afraid it doesn't work for my linear model which only accepts 1-d array as the input feature.
    – M. Tang
    Sep 22, 2023 at 14:44

1 Answer 1


You can always get the slope of a linear regression line through the data, though it would be a questionable number – at least you could talk about how bad the fit is. You can also try breaking the contour into two pieces (perhaps picking the midpoint) and treat is as two straight lines. Or you could try these methods by Liberman, which don't necessarily solve your problem but his discussion is enlightening.

  • Thanks! The link you shared relates to my question a lot. However it leaves a lot of space to interpret what the slope means in a polynomial fit to a F0 contour. Anyway this is very useful information to me. Many thanks!
    – M. Tang
    Sep 22, 2023 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.