Preface
This book should not exist. There are already many freely available materials online. Many universities provide open courses and teaching materials. Publishers offer free books and PDFs. Generous educators share tutorials and lessons on video platforms and social media1. I also hope you have access to local libraries wherever you are. For Malagasy scholars, in my personal experience, foreign colleagues rarely mind bringing books over—you just need to ask with and within reason. Ultimately, I expect that most of what is written here is already taught in undergraduate and graduate courses at your institutions.
So, is there a real need for this book? Well, I try to address a few superficial problems with this handbook.
The first problem is fragmented information. There are plenty of books on coding, statistics, and mathematics—some foundational, others applied. However, if you are reading a statistics book and bump into an unfamiliar mathematical concept, searching for an appropriate math reference is not trivial. Likewise, if you use a specific R package, finding the complementary statistics text can be equally difficult. In either case, you are forced to search for information across multiple sources, hoping it aligns with your level and context. One main goal of this handbook is to bring together essential knowledge in mathematics, statistics, and coding in one place to form an ecosystem.
The second problem is that many textbooks are dense and overly formal. My main idea is to focus on the applied side, whether in mathematics, statistics, or coding. While there are sections for formal definitions2, most of the text focuses on intuition, concrete examples, and practical advice. Each topic is broken into short, dedicated, digestible chapters designed to promote active learning.
The third problem is that most books are written by non-Malagasy scholars, meaning they reflect different perspectives and worldviews. Although I wrote this book in English3, my target audience is Malagasy students and researchers. Contexts and examples are much easier to grasp when they align with Malagasy ways of thinking and living. For instance, it is far more natural for a Malagasy researcher to picture traveling from Antsiranana to Tolagnaro than from New York to San Francisco. Most of the intuition, examples, and metaphors carry a distinct Malagasy flavor4.
The final problem is that many Malagasy scholars simply cannot afford books. This is book is totally free: you can download it, use it as you wish, and share it. Please be aware that this is a self-edited book, so you should not cite it as a formal academic reference. As the proverb says, Saonjo iray lohasa, tsy laozan’izay mamara. Someone might try to turn a profit from this work; I am truly sorry for anyone who pays for it and gets scammed.
As a word of caution, I am no expert in any of these topics. I am mostly self-taught in statistics and programming. There are true experts in these fields, and they should be your primary reference. This book is based on my own experience—the way I understand concepts and the way I code. It is a generalist approach aimed at facilitating conversations among mathematicians, statisticians, programmers, and especially data-driven researchers. I cannot say I failed, but I am certainly not confident I succeeded.
The emergence of AI might also render this book obsolete, as AI can already address many of the superficial problems mentioned above. I used AI myself to edit text, format code, and perform sanity checks. I find many of these features useful. However, I also posit that as a researcher, honing your own skills and developing original ideas remain essential. Most importantly, over-dependence on tools unaware of their mistakes is dangerous. Learning and becoming an expert requires doing things right, doing things wrong, and repeating the process.
This book is a tool to address these superficial problems. I leave it to each of you to handle the real challenge: grit.
Structure and usage
This current version contains three parts: basic mathematics, basic statistics, and basic coding. Each chapter shares the same format:
- Intuition: Starts with a short quote to help you understand or remember the main idea, followed by text elaborating on the topic.
- Formal definition: The theory found in standard textbooks, linking intuition directly to formal definitions.
- Examples: Applied demonstrations of the concept.
- Tips and warnings: Practical advice for avoiding common traps.
- Notation/Semantic/Terminology: A dedicated section clarifying key technical terms.
Do not be frustrated if some concepts feel repetitive across chapters. Repetition is part of learning, and since you are not expected to read every chapter sequentially, reminders are provided whenever a concept reappears.
Code blocks are intentionally omitted from the mathematics and statistics sections. You will need to download and install R and RStudio to practice the code in the third part of this handbook.
Preface to version 0.5: beta
This project has been a long process. While the idea of helping Malagasy researchers with data analysis was born a while ago, it took years for me to make up my mind on the topics, format, and structure. Although I am not entirely satisfied yet, it is time to release this initial draft. Many readers may feel underwhelmed, if not disappointed, by the foundational depth and chapter selection, but I decided to publish version 0.5 for two main reasons:
- Directional feedback: Is this book moving in the right direction? Your constructive (or critical) feedback is direly needed. You can email me directly or fill out this feedback form. Thank you in advance for your help!
- Emphasis on foundations: It takes time to master the basics. In most workshops I have taught, the main hurdle was always the fundamentals, which are often crammed into a few days and leave students overwhelmed. This version highlights the importance of core concepts and gives you enough time to digest them.
You can think of this book like a software release, which is why I refer to versions rather than editions. I will occasionally update sections and publish them as versions 0.5.1, 0.5.2, and so on. Only the latest version will be available online, as previous drafts will not be archived. I sincerely hope the wait for official version 1.0 will not be too long.
Some might be more legitimate than others.↩︎
Which can always be googled; they are included here purely for completeness.↩︎
A Malagasy version is in the works, but that requires a lot of extra effort.↩︎
Madagascar is a diverse place, so to be precise, this reflects my own experiences in the environment where I grew up.↩︎