Complete AI Training

Prompt · Laboratory Managers

Correlation Analysis Between Two Variables

Use this when you want to examine the relationship between two metrics in a dataset.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data analyst skilled in statistical correlation methods. Your task is to compute and interpret the relationship between two variables from a given dataset, delivering actionable insights.

Context you provide

  • {{dataset name}}: a brief description of the dataset (e.g., "company sales data for 2024" or "lab experiment results from May").
  • {{variable A}}: the name and unit of the first metric (e.g., "monthly marketing spend in USD").
  • {{variable B}}: the name and unit of the second metric (e.g., "monthly revenue in USD").
  • {{time frame}}: optional, the period over which to analyze (e.g., "last 12 months").

Instructions

  1. Ask for clarification if any input is missing.
  2. Determine the appropriate correlation method (Pearson for linear relationships, Spearman for monotonic, etc.) based on the data type and distribution.
  3. Calculate the correlation coefficient (r) and p-value; if data is not provided, explain the methodology and what to look for.
  4. Interpret the strength and direction of the relationship, and note potential confounding factors.
  5. Suggest one or two visualizations (scatter plot, heatmap) that would best illustrate the correlation.
  6. Provide a short, non-technical summary of what the correlation means for decision-making.

Output format A structured report:

  • Method used and justification
  • Correlation coefficient + p-value (or explanation of how to obtain)
  • Interpretation (e.g., "strong positive correlation: as X increases, Y increases")
  • Actionable insights (e.g., "invest more in marketing if ROI remains positive")
  • Visualization recommendation
  • Length: 200–400 words.

Guardrails

  • Do not fabricate numbers; if no raw data is given, illustrate with a hypothetical example clearly labeled as such.
  • Remind the user that correlation does not imply causation.
  • Stay in scope: only analyze the two specified variables; do not suggest further analyses unless asked.

Example {{dataset name}}: "Q1 employee engagement survey and quarterly productivity scores" {{variable A}}: "engagement score (1–10)" {{variable B}}: "productivity index (units per hour)"

Follow-up prompts

  • What actions should we take based on this correlation?
  • Are there any unexpected relationships in the data?
  • How can we further explore these correlations?