A stool pH test measures the acidity or alkalinity of a child's stool. The pH scale ranges from 0 to 14, with 7 being neutral. Values below 7 indicate acidity, while values above 7 indicate alkalinity. This test is often used to diagnose various gastrointestinal conditions in children, such as lactose intolerance and certain types of diarrhea.