A statistical relationship is a pattern between data columns that is supported by observed values rather than a hunch. Here, the practical goal is to look for demographic and financial features that predict customer behavior—or to compare regions by average household wealth. “Statistically valid” is the important bit: a fluent answer is not proof, so results still need checking. section 8.1
A lightweight workflow is:
- Prepare a tabular dataset with clear, descriptive column names; ambiguous labels give an AI little to work with. section 8.1
- Ask a focused relationship question, such as whether age, neighborhood, income, and other features predict purchases. section 8.1
- Request a concrete aggregate or ranking, then verify that the output matches the underlying data. section 8.1
Finding wealthier regions
With customer age, geographic location, assets, debt, and investments in separate columns, ask which five regions have the highest average household net wealth. This looks for a relationship between geographic location and household wealth, expressed as a regional ranking rather than mystical spreadsheet vibes. section 8.1
response = index.query("Based on the data, which 5 geographic \
regions had the highest average household net wealth? Show \
me nothing more than the region codes")
print(response)
This query turns a relationship question into a constrained request for the five region codes with the highest average household net wealth. section 8.1
