In this episode of The Effective Statistician, I talk with Justin Belair about the process of writing a book on causal inference, one of the hottest topics in statistics.

Justin explains how he discovered causal inference, what motivated him to write a hands-on technical book, and how he balances theory, real-world applications, and coding exercises. Having written a book myself, I know the challenges firsthand, so we dive into the strategies that make writing more effective.

If you want to learn more about causal inference, apply practical tools in your work, or even write a book yourself, this episode has plenty of insights and inspiration. Tune in and join the conversation!

Key points:

  • Causal Inference – Hot topic in statistics
  • Justin Belair – Guest, statistician, book author
  • Book Writing – Motivation, challenges, process
  • Balancing Content – Theory, real-world applications, coding exercises
  • Effective Writing – Strategies, focus, overcoming obstacles
  • Practical Tools – Applying causal inference in work
  • Inspiration – Insights for statisticians and aspiring authors
  • Tune In – Engaging discussion, learning opportunity

Writing a book on a complex topic like causal inference takes dedication, clarity, and a deep understanding of both theory and practice.

In this episode, Justin Belair shares his journey, insights, and practical strategies for mastering causal inference and making statistical concepts more accessible. Whether you’re a statistician, data scientist, or simply curious about this evolving field, you’ll gain valuable takeaways that can enhance your work.

Don’t miss out—tune in now to hear our full conversation! And if you found this episode helpful, share it with your friends and colleagues who could benefit from Justin’s insights.

Check out his book here:

Causal Inference in Statistics with Exercises, Practice Projects, and R Code Notebooks


I’m thrilled to share that my book, “How to Be an Effective Statistician – Volume 1”, is now available! 

It’s packed with insights to help statisticians, data scientists, and quantitative professionals excel as leaders, collaborators, and change-makers in healthcare and medicine.

Check out the testimonials and grab your copy!

Boost Your Leadership with MDLC!

The Medical Data Leaders Community (MDLC) gives you the tools and support to grow your leadership skills, expand your influence, and drive meaningful change in healthcare research. Whether you’re just starting or already leading a team, this community helps you take your career to the next level

Learn more here!

Never miss an episode!

Join thousends of your peers and subscribe to get our latest updates by email!

Get the shownotes of our podcast episodes plus tips and tricks to increase your impact at work to boost your career!

We won’t send you spam. Unsubscribe at any time. Powered by Kit

Learn on demand

Click on the button to see our Teachble Inc. cources.

Load content

Justin Bélair

Biostatistician in Science & Tech | Consultant | Author of Causal Inference in Statistics | Founder & Editor at biostatistics.ca

Often called a nerd, I prefer to say I am passionate about science 😂. With sound statistics, I believe we can create better science.

As a biostatistician, I help scientists from various fields bring their research to life through application of best principles to study design, methodology, and data analysis. I work tirelessly so that together, we make a real impact in the scientific community.

I can work on any phase of a project: design and conceptualization, analyses and interpretations, or writing up results for publication. Preferably, we work together through the whole project, it tends to give the best results!

I’ve worked with academics in immunology, virology, nephrology, neurology, epidemiology, psychiatry, social cognition science, agronomy (crop sciences), ecology, and more.

I’ve worked with industry scientists and R&D in the biotech and biopharma industries.

With close to 20 years of experience in teaching, and close to 10 years as a University Lecturer, I have established myself as a skilled educator of complex concepts; skills that I have honed as a University Lecturer that can be brought to our scientific collaboration.

In the words of a close collaborator : “He has a deep understanding of statistics, yet is able to skillfully explain complex concepts to people with little-to-no background in statistics both in French and English.”

You can book a 1h call to “pick my brain”, asking any statistics related questions here: https://calendly.com/belairjustin/get-answers-now-60min

If you have a project in mind and think we could be a good fit for a collaboration, you can book a discovery call here : https://calendly.com/belairjustin/discovery-call-30-min

For more information on my practice as a consultant, visit my website: www.justinbelair.ca

Transcript

Behind the Scenes of Writing a Book About Causal Inference

00:00
Alexander: You are listening to the Effective Statistician Podcast, the weekly podcast with Alexander Schacht and Benjamin Piske designed to help you reach your potential, lead great science and serve patients while having a great work-life balance.

00:24
In addition to our premium courses on the Effective Statistician Academy, we also have lots of free resources for you across all kind of different topics within that academy. Head over to thee and find the Academy and much more for you to become an effective statistician.

00:51
I’m producing this podcast in association with PSI, a community dedicated to leading and promoting the use of statistics within the healthcare industry for the benefit of patients. Join PSI today to further develop your statistical capabilities with access to the ever-growing video on demand content library, free registration to all PSI webinars and much, much more.

01:15
Head over to the PSI website at www.psiweb.org to learn more about PSI activities and become a PSI member today.

01:30
Welcome to another episode of the Effective Statistician. And today we are talking again about a very, very important topic, causal inference. And for that, I have an expert today on the line. Hi Justin, how are you doing?

Justin: Hi Alexander, I’m doing great. Thanks for having me.

Alexander: Very good. So Justin, when did you first step over this topic of causal inference?

01:59
Justin: I would say maybe five years ago, I heard about Judea Pearl’s work and I started to read a little bit about it and at first maybe dismissed it. These are just like pictures of arrows and things of the sort. We can talk about it later. But then I bought his book and I read it and I found it very interesting. And then I just started.

02:22
learn a lot about it, mostly through books, but I also took some courses. And so that’s kind of my journey in learning causal inference. Okay. Very good. Have you ever applied it in your day-to-day job as a consultant?

Justin: Yeah. So, I mean, there’s two kinds of ways to look at data to discover causal relationships. There’s obviously the experimental method with

02:48
randomized trials that is well known, but even then because of non-compliance and things of the sort, you kind of have to be careful and that obviously is a large part of my work. And then there’s the other side, which we could call maybe observational or when you work with a real world, real world data.

03:08
A lot of fields, for example, epidemiology rely on observational data. I mean, they, they design the data collection, but it’s obviously not a randomized trial. They look at disease and populations. Um, so I’ve worked with epidemiologists who kind of have either real world data or either designed data collection, uh, cohort studies, case control studies. And there’s often issues with confounding and, uh, selection bias and.

03:36
the usual causal problems. So I helped them to design analysis that can help mitigate these problems, either through techniques like adjustment or propensity score methods or things like that.

Alexander: Okay. Cool. Yeah. And now you took on a whole new effort writing your book about causal inference. And given that I just published my book, I know that it’s quite a big tasks and my book was a…

04:06
was a non-technical book, but your book is really a technical book. What led you to kind of sort of write a book about this really hot topic at the moment?

Justin: Yeah. I mean, it was kind of, I guess, a dream I had to write a book. I’ve been in the university world for a long time, been teaching, designing courses. And I’ve always thought it would be nice to have a book, leverage that book to teach courses. I thought.

04:33
There’s a lot of great causal inference books, but not exactly the one I have in mind. So I guess it was a bit of a crazy decision to start writing it, especially as you say, it’s very complex topic. It’s evolving very fast and every day there’s a lot of papers coming out, but I really wanted to write it for kind of find a way to give people applied tools, give them code, give them exercises to really understand the methods, but also without sacrificing the…

05:02
concepts and the theory. So it’s a delicate balance to achieve, but it’s really like the chapters I’ve written so far, I’m quite proud and I’ve got good feedback on them. So I think I’m navigating this pretty well. So the chapter starts with some theory and some notation, and we try to make it digestible and then there’s always a case study with data and code to start practicing and there’s also a section with exercises that

05:32
can be done maybe more by hand or that make you think a bit more. So in this sense, I think my book is unique among the great causal inference books.

Alexander: Okay. So it’s a really, really kind of a book for hands-on learning, so to say.

Justin: Yeah, exactly. I have a background in mathematics. So when I read Pearl’s book or Imbens and Rubens book, it’s clear to me what’s going on, but there’s not exercises. There’s…

06:00
Sometimes they analyze data, for example, in the Imbens and Rubin book, but there’s no exercises, there’s no code. I understand that I hear a lot of people say, all these books are very difficult and it’s true, they are difficult. So I kind of want to show them how to learn tools and how to come away from their experience, learning causal inference with real tools that they can apply in their day-to-day work, either coding tools and analytical tools, but also conceptual tools. Like how do you think about.

06:29
causality in science. How do you think about causality in a given data set? How do you start to approach the problem with the new lens? And I think it’s something that’s also not traditionally taught in like undergrad statistics. So I kind of want to show them like, everything you learn in undergrad statistics is very important. But in most sciences, it’s not as clean as what you learn in

06:56
undergrad statistics and causal methods can really help you get closer to the truth, I guess closer to causality.

Alexander: Yeah. I think it’s a absolutely must have to learn nowadays. Yeah. So, um, lots of listeners are used to analyzing clinical trials. And of course, you know, if you have perfect randomized clinical trials and you have everybody follows to the end and says no kind of intercurrent events.

07:25
Yeah, then life is easy, but in reality, that’s never happens. In nearly all cases, you will have intercurrent events and then understanding causality is not that easy. It gets even more difficult if you step outside of efficacy, but you step more into the safety side and so you very often have, you know, lots of data, very often not randomized anymore. And you still need to make sense of it. And there’s

07:54
maybe some dose or exposure adjusted things and then very, very easily gets into this epidemiological case. Not even speaking about pure observational studies, both retrospective and prospective ones. And I love what you’re saying, that your book comes with examples, both examples in terms of data and also examples of code. Because if I actually play with code and play with data,

08:24
I can much more easier understand the different concepts in it. And I can also translate it into my case studies. Yeah. My data sets that I need to work on because conceptually understanding something and actually doing it are really two different things.

Justin: Yeah, I agree. And it’s like, I was speaking with a collaborator who’s also a causal inference expert in the U S and he was kind of putting it in the way that I like.

08:53
It’s like there’s three ways to teach it. There’s the math notation that not everybody will be familiar with. Not everybody has that background. Then you can explain it in words, which probably is more accessible, but a bit less precise. And then you can explain it by looking at what does this do to data. And that’s kind of like a new way to teach. I get new quote unquote, but it’s today with access to code. You can do this at home with no problem.

09:22
So I really want to try to put these three approaches together so that the person who’s more practical, who wants code examples, who wants to copy some code and then rework it for their own use cases, they have the code. Those that are good with the math, they have the math and those that like metaphors and stories, they have that. And hopefully that way, the goal is that the person actually learns the material, feels confident in applying it in their work. So.

09:52
That’s kind of how I’m trying to approach writing this book.

Alexander: That is really, really a nice way to put it with these three different ways of teaching. I think that is something that we can take away from and use for other areas as well to make sure that people really understand what they’re doing. While writing this book, what are kind of your lessons so far about what helps you write effectively?

10:22
And what are kind of bigger challenges?

Justin: Yeah. So for me, I’m sometimes the, the best technique is to kind of step away and take a break. Sometimes there’s some challenging parts that I’m not sure how I want to approach them, how am I going to make things fit together? I don’t want to repeat myself too much. I want, you know, so sometimes a few days I step back.

10:47
And then I go take a walk and then suddenly, oh, it kind of starts making sense. I think I’ll write it like this. Then I write it. What’s challenging for me, the quantity of material that could be put into a book. As we discussed briefly earlier, it’s causal inference is now very hot topic. There’s been a lot of research and now every day a lot of research comes out. So how do I make it current?

11:16
but while still giving a good foundation, how do I select the topics? I want it to be broad so that someone can kind of see the landscape of causal inference and the methods, but I also don’t want it to, you know, I don’t want to write the Bible. I want it to be manageable. So that’s the biggest challenge. Also, it’s like when I get to more editing part, I want to make it more concise. So I have to be…

11:46
cutting out sections and then because I wrote them, I think they’re all important. So that’s hard and that’s why I need some people to look at it, tell me, no, Justin, this part, you don’t need that, like cut that out. Yeah, so it’s like interesting challenge.

Alexander: Stephen King called it, you need to kill your babies. Yeah, exactly. So it’s kind of the editing part sometimes actually feels like that. Yeah.

12:15
I had the same feeling with writing about leadership in my book. Yeah. Leadership is such a broad topic and you can talk about so many different things. So I definitely need to cut out lots of lots of different things and make it still manageable, still got a, like a 400 page book, which is much bigger than I anticipated earlier it would be. I think for me important was to.

12:44
to get into some kind of flow when writing. So having no distractions whatsoever, just being with myself, focusing on the writing part, not having any meetings, any chat open whatsoever. So there was just the book and myself. And that helped me quite a lot to move really, really fast with the book.

Justin: Yeah, I also, I agree. I started writing it last year.

13:13
Yeah, since all my business is consulting and freelance and content, I don’t need to report to an office or anything. So last year I tried for the first time to travel and work. And that was really good. Like I traveled, I took vacation and then for the second part of my trip, I just said, okay, now I’m going to write. I’m not home. I don’t have to worry about everything. That’s home. I tell my clients I’m on vacation.

13:42
And then I get a lot of writing done. And I did this again, um, last month. And, uh, that’s really where I do a lot of progress. It’s when I kind of block out some dedicated time, a few weeks, no meetings, no projects, and just, okay. If I write three, four hours a day, um, of very focused writing, I can get a lot done like that, but it’s always a challenge to block out.

14:11
so much time to write. So I also have to write while managing my business, but it’s a bit more difficult. I can write in the morning, but then sometimes there’s distractions, there’s pressing problems. So it’s not always easy to manage, but it’s an interesting challenge. I’m learning a lot about the process of committing long-term to something that is big.

Alexander: Yeah. I think, see, you know, I’ve wrote a book while being in a clinic.

14:40
And there was always this kind of time when there was no therapy on the weekends. When I was in the clinic, I had lots of long hours to stay focused and, and, and fright, uh, that was quite, quite helpful to make big leaps. Yeah. What I found really exhausting was the editing part in the end. So I read through the whole manuscripts and, uh, do the editing part. That felt really, really long.

15:09
But kind of the writing part, the hours passed by pretty fast. Yeah. And all of a sudden I had, you know, a couple of more chapters done. That was really, really nice.

Justin: Yeah. No, I can imagine because right now I’m doing this like independently. So how I’m planning to do it is kind of release it in parts online, like a ebook version, release it in three parts and then

15:37
at the end, make a physical version to send it to people that want it. So I’m finishing up the first part and I’m starting to go through editing and it’s difficult. It’s like, it’s hard to explain, but there’s just a lot of material, a lot of decisions, and that’s why I think people use editors. I understand why you need some external feedback to do that part. And a lot of unanticipated challenges, but it’s very, very rewarding experience. Uh, I feel the chapter is finally making sense.

16:07
I’m very proud. It’s hard to describe that feeling also.

Alexander: Do you use chatjpt to help you with your writing?

Justin: Yeah, I use different tools. So basically like the writing of the content, I write it all myself, but I use a lot of tools for tracking down citations, like I can use an AI tool to format my citation, things like that. For the editing, I’m playing around with trying to use AI to help me edit.

16:37
There’s also like these specialized AI tools that you can pay nowadays that kind of are very specialized in editing. I forget the name. So I’m playing around with that and trying to see, okay, is there value here in paying for this service? But did you use it a lot when you were writing?

Alexander: Actually, well, you know, my book is more like, it’s not a classical textbook. It’s a story about a fictional character.

17:05
Claire, who is a statistician and she goes through all kinds of different day to day challenges. So to write the dialogues, I used JetJPT where I said, okay, I want to have these different people in there. They have said challenge, they have these kinds of different thoughts, feelings, emotions about things. And then I…

17:30
use chat GPT to basically write the dialogues. Okay. Yeah. So the paid version, by the way, because it’s a free version. You can’t do lots of these things. Okay. And that helped me quite a lot. Of course, you know, to kind of fine tune, you need to iterate quite a lot. Yeah. And some of them is kind of manual fine tuning at the end. Yeah. That helped me pretty fast to get through things. And I used it also for.

18:00
summarizing things at the end. Yeah. So every chapter has some kind of key takeaways at the end plus exercises. Yeah. Well, with leadership, you don’t have code. And you usually don’t have formulas. So for me, it’s really the storytelling and then the exercises to be done on the job.

Justin: Yeah. So I use it also for the summaries.

18:25
because I’m using a LaTeX because it’s like, I don’t know if you’re familiar, but yeah, it’s very technical. So I can just like tell the AI, okay, this is my chapter. What do you think are the key takeaways? Can you format it in LaTeX and it does a good job? Then I can polish it. So it cuts down maybe by half, at least the time of writing these summaries. And for the code, the code also, it’s like, it’s very helpful for that.

18:52
either just using like a copilot, auto-complete, or even just like, okay, I have this data. I want to do this with it. I want to make this plot very traditional AI use cases. Like instead of writing out the whole code for making a plot, the AI does it. Then I can just tweak it if I want, but usually it’s exactly what I want. It’s pretty good with code. So yeah, that’s the main aspects.

19:19
The content per se, I haven’t really used it, but maybe there are some ways I could use it, but I haven’t used it in like the main text except for citations and things like that.

Alexander: Yeah, I think the LaTeX is very good if you use lots of notations, mathematical notations. I wrote my master and my diploma and my PhD thesis and that and lots of papers and things like this and that. But…

19:48
haven’t touched this for the last 20 years, I would say.

Justin: Yeah, it’s evolved a lot. I probably it’s, yeah, I used it also in school a lot for assignments for thesis and things like that. And as soon as I have some math to write, I kind of go to go for that. I’m pretty good at using it. It doesn’t really like slow me down. And because I learned it before, so it’s a good tool, and it makes a nice formatted book out of the box. So I like that.

Alexander: Yeah, and you can

20:17
have your own commands created that kind of really streamline how you write formulas and things like that. That’s a pretty nice part about it. Justin, where will people learn about the book? What’s your guidance, where to go to?

Justin: Yeah, that’s a great question. So the main place is on my website. My website is my name. So Justin, Belair, B-E-L-A-I-R dot C-A.

20:44
And in the menu, there’s a, at the top, there’s a causal inference book. You click that there’s a page that not only describes the book, but I provide the first chapter for free as a PDF. So if you’re interested, you can just go look at the PDF and if it’s something you like, it’s available for pre-order that helps support my writing. So if you’re interested, the price is discounted for the pre-order. And also, if you follow me on LinkedIn.

21:14
that again, just my name, Justin Belair, B-E-L-A-I-R. I write a lot about different topics and statistics and causal inference. And from time to time I write, oh, well, if you want to learn more, you can learn more in my book. So those are the two main places where you can learn about it.

Alexander: Yeah. I highly recommend following Justin on LinkedIn. Always great posts. Thanks. Thanks so much, Justin, for walking us through

21:44
couple of behind the scenes of writing a book, which I think I hear lots of people at least thinking about it, but there’s not a lot of people actually doing it. And so it was great to have some kind of exchange about it. And thanks for your insights on how to train statistics using kind of, you know, some mathematical formulas, the plain language and the code.

22:11
Justin: Yes, I appreciate it. Thanks for having me. It’s a great opportunity. I love your show for people listening. If ever you have questions about causal inference statistics or writing a book or anything else, I love to talk. Just send me a message. Sometimes it might take a few days, but I’ll eventually answer. I love having these discussions. So please don’t hesitate to reach out.

Alexander: Thanks a lot.

Justin: Thanks.

22:40
Alexander: This show was created in association with PSI. Thanks to Reign and her team at VVS, who helped with the show in the background, and thank you for listening. Reach your potential, lead great science, and serve patients. Just be an effective statistician.

Join The Effective Statistician LinkedIn group

I want to help the community of statisticians, data scientists, programmers and other quantitative scientists to be more influential, innovative, and effective. I believe that as a community we can help our research, our regulatory and payer systems, and ultimately physicians and patients take better decisions based on better evidence.

I work to achieve a future in which everyone can access the right evidence in the right format at the right time to make sound decisions.

When my kids are sick, I want to have good evidence to discuss with the physician about the different therapy choices.

When my mother is sick, I want her to understand the evidence and being able to understand it.

When I get sick, I want to find evidence that I can trust and that helps me to have meaningful discussions with my healthcare professionals.

I want to live in a world, where the media reports correctly about medical evidence and in which society distinguishes between fake evidence and real evidence.

Let’s work together to achieve this.