Statistics and Data Science Meet on the Tennis Court with Swing

Swing, an AI-based Tennis App, Allows Players to Track Their Stats and Improve Their Games

Swing Tennis Statistics App by Swupnil Sahai

An avid tennis player, Swupnil Sahai (above) created an app called Swing that’s used by tennis players in more than 100 countries. Photo credit: Cyrus Chen

When he was a graduate student in statistics at Columbia, Swupnil Sahai considered doing his doctoral dissertation on the statistics of tennis. As an avid tennis player, he wanted to create an easy-to-use app that amateur players could use to track their games. He imagined creating something for  iPhone and Apple Watch through which players could tally their scores and stats, log their workouts and analyze their swings.

Ultimately, his dissertation focused on something far more academic and forbidding sounding: computational Bayesian statistics with applications to partitioned data in astronomy and sociology. But what he learned about data science, machine learning and statistics in his classes gave him the necessary skills to form the company Mangolytics and create Swing, an AI-based tennis app that’s now the number one app in the world for Apple Watches. That ranking is based on downloads for the past week, and Swing has held the number one weekly  spot for most of the summer.

“As a player and a lover of the game, I always wondered why professional players had access to detailed stats about their shots and points while the rest of us were left behind,” says Sahai, co-Founder and CEO of Mangolytics. “That’s what motivated me to make this app.”

Swing’s partnership with Apple has been a crucial part of the app’s traction, adds Sahai. Apple featured Swing on the front page of its iOS and watchOS App Stores for most of the summer. In August, Apple demoed Swing to journalists from prominent technical publications such as ArsTechnica, Engadget, VentureBeat, The Verge, and Wired as part of a briefing on the leading apps taking advantage of CoreML, Apple’s new machine learning framework. And on Sept. 12, Apple added Swing to its website as one of top workout apps for the new Apple Watch Series 4.

Swing helps players tally their match scores and stats.

Swing just released a new video feature that automatically generates highlight reels of the most important points from every match.

In a story featured on its U.S. App Store, the Apple editorial team wrote, “Swing makes it easy to find fellow tennis fans and open courts in your area. Part social network, part tennis coach, it matches you with similarly skilled players. On the court, it keeps score and tallies your shots, while a companion Apple Watch app handily tracks your forehands, backhands, and serves.”

The app shows players nearby courts and players so they can find the best tennis courts and hitting partners.The app shows players nearby courts and players so they can find the best tennis courts and hitting partners.

Mangolytics has 12 employees – a mix of former Apple engineers and former professional tennis players. For his day job, Sahai is a senior computer vision engineer on Tesla’s Autopilot team. The team, which meets weekly with CEO Elon Musk, builds the algorithms and neural networks – machine learning models whose math formulas mimic the human brain’s nervous system – that allow the cameras in Tesla’s cars to detect lane lines, vehicles and pedestrians and make decisions about steering and acceleration. Sahai uses similar technology in the Swing app, which runs a tiny neural network on the Apple Watch to analyze tennis strokes in real time.

Sahai says the skills he learned at Columbia are helping him to succeed at Tesla and Mangolytics. He recently emailed his doctoral advisers from Columbia – Tian Zheng, professor of statistics and associate director for education at the Data Science Institute (DSI), and Andrew Gelman, professor of statistics and political science and member of the DSI – telling them how much he benefited from their teaching.

“Thank you both for all of your guidance and wisdom over the past five years,” wrote Sahai, who graduated in 2017. He added that the “problem solving and analytical skills” he learned from Zheng and Gelman enabled him to build Swing.

The Swing app, whose elegant design and functional features has made the app immensely popular with tennis players creates a social network for tennis by allowing users to find the best courts nearest to them and messaging the players who frequent those courts. That allows players to schedule matches and practices ahead of time. Swing also makes it easier than ever before for any player to track points and statistics previously available just to professionals, such as first-serve percentage and break-point conversion. A player just needs to swipe down on the watch if he or she loses a point or swipe up to register a win. A friend, coach or parent can track scores on iPhones or iPads, too. The third and most popular feature is the app’s swing analyzer, which, when used with an Apple Watch, automatically tracks swing type (forehand, backhand, serve, etc.) and the speed of the racket head, letting players know whether their swing speed is decreasing or increasing as the match progresses. After each match, Swing’s proprietary AI combines all data related to points and technique to make recommendations about how players can improve their games.

On Apple Watch, Swing analyzes users’ shots and workouts for every match or practice.On Apple Watch, Swing analyzes users’ shots and workouts for every match or practice.

These features are available for free to users who download the app. For a fee, the app also offers advanced analytics and graphs, as well as digital-coaching features like smart recommendations. Recently, the company released a video-based feature that analyzes every point in a match to automatically generate highlight reels of the most important points. In the next year, Sahai sees video-based AI as becoming a core feature of the app.

Sahai and his company have won accolades and partnered with major organizations. In 2016, he was selected from over 100,000 applicants to pitch Swing on Apple’s Planet of the Apps TV show. He was twice awarded scholarships to attend Apple’s Worldwide Developers Conference, for which he was featured on Macrumors. And Swing is the official scorekeeper for Tennis Alberta and touchtennis; more partnerships are being planned.  Additionally, James Blake, the former Number 1 ranked American and Davis Cup champion, and Steve Wood, the former CEO of Tennis Australia who organized the Australian Open for 8 years, recently joined Mangolytics as advisers. Blake and Wood will help the company create partnerships with active professional tennis players and international tennis organizations.

Sahai envisions expanding the company to soon offer voice and video-based AI for all sports, starting with racket sports.

“I started working on Swing when I was a Ph.D. student at Columbia but never really told my advisors about the extent of my interest in developing it,” says Sahai. “But now that the app is doing well, I was delighted to write to Professors Zheng and Gelman and tell them I’m doing my best to share the beauty of statistics and data science with the world!”

–By Robert Florida

550 West 120th Street, Northwest Corner Building, Suite 1401, New York, N.Y. 10027    212.854.5660
©2020 Columbia University