Back in 2013, a seminal U.N. report highlighted that more people have mobile phones than flush toilets. Today we can leverage smart phones and wearables to create more representative data pools of our global population than studies done with WEIRD (western, educated, industrialized, rich and democratic) research participants—in other words, typical U.S. college students.

Also, can you guesstimate how many times the average person touches a cell phone in a day? The answer is approximately 3,000 times.

A rich tapestry of our lives can increasingly be woven together by aggregating and analyzing each touch—and each conversation, oral or written, held by billions of people, every day.

Such data have already proved invaluable in bridging dozens if not hundreds of research gaps by collecting real-world, “ecologically valid” information from people in their natural day-to-day lives rather than in the artificial environment of a typical lab. Further, the information can help us bring objective, quantitative data down the line to psychology and psychiatry researchers. Most research still attempts to quantify assessments of mental illnesses, such as depression, based on patients’ biased subjective reporting.

Neuroscientists and technologists are hard at work developing earlier and more accurate diagnoses for a variety of disorders, as well as personalized therapies for patients and preventive interventions for the general public. The data can be acquired through active means (what you type) and passive observations (how you type). All of this research can be conducted using inexpensive sensors embedded in smartphones and other personal devices.

Once this wealth of data is at hand, machine learning and artificial intelligence will offer opportunities to quickly analyze massive data sets acquired from these sensors to formulate diagnoses, develop treatment regimens and even make predictions about the risk of mental health issues for both individuals and the community as a whole.

Given that biological markers and diagnostic criteria for mental health conditions remain sparse and unclear, the rhythm and patterns discerned from the data gathered offers a quantitative window on mental health. The ultimate goal is to offer universal access to accurate diagnoses and timely, effective, personalized therapies to the planet’s eight billion human minds.

Digital technologies are beginning to revive the sleepy field of psychiatry. We can utilize commercial-grade technologies and data sets and help apply these findings into health care practice much faster than the typical lag time of 17 years. In a nutshell, digital psychiatry can democratize applied research as citizens choose to use apps to self-manage their mental health and self-care and consent to share their data with researchers and digital developers.

While there is enormous opportunity, we also see thorny ethical issues. Who will have access to the data, and for what purpose? App and device users do not always know what data they are sharing and with whom. Developers, ethicists, citizens and policy makers must find practical resolutions as to how to manage trade-offs for benefits and risks, data protection and privacy, the accuracy of the underlying algorithms for machine learning and artificial intelligence, informed consent protocols, and more.

But the opportunity is real. Every smartphone is a lab, and every smartphone user is a scientist in the making.

This is an opinion and analysis article, and the views expressed by the author or authors are not necessarily those of Scientific American.