Question 362 of 506
Data for AImediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is the rolling average of purchase amounts over a 30-day window. This technique is the most appropriate because it computes a moving mean that respects the timestamp order of transactions, using a sliding window function—such as AVG() with a ROWS or RANGE frame in SQL or rolling().mean() in pandas—to ensure only the most recent 30 days of data per customer contribute to the feature. On the Salesforce AI Associate exam, this question tests your understanding of time-series feature engineering, specifically how to create a rolling average feature for an AI model that captures recent customer behavior without leaking future information. A common trap is confusing a simple overall average with a windowed calculation; the key distinction is that a rolling average dynamically updates as new timestamps enter the window. Memory tip: think of a “sliding spotlight” that only illuminates the last 30 days of data, ignoring everything older.

AI Associate Data for AI Practice Question

This AI Associate practice question tests your understanding of data for ai. Compare every option against the stated constraints before choosing — the best answer satisfies all requirements, not just the most obvious one. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A data engineer needs to create a feature that represents the average purchase amount per customer over the last 30 days. The transactional data is timestamped. Which feature engineering technique is most appropriate?

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Rolling average of purchase amounts over a 30-day window

Option B is correct because a rolling average over a 30-day window directly computes the average purchase amount per customer for only the most recent 30 days of transactions, which matches the requirement of a time-sensitive feature. This technique uses a sliding window function (e.g., AVG() with a ROWS or RANGE frame in SQL, or rolling().mean() in pandas) that respects the timestamp order, ensuring only relevant data contributes to the feature.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Sum of all purchase amounts per customer

    Why it's wrong here

    Sum doesn't give average.

  • Rolling average of purchase amounts over a 30-day window

    Why this is correct

    Rolling average matches the requirement.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Count of purchases per customer

    Why it's wrong here

    Count is not average.

  • Minimum purchase amount per customer

    Why it's wrong here

    Min doesn't reflect average behavior.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Salesforce often tests the distinction between simple aggregation (like sum or count) and time-windowed aggregation, trapping candidates who overlook the 'over the last 30 days' temporal constraint and choose a static aggregate instead.

Detailed technical explanation

How to think about this question

Under the hood, a rolling average over a 30-day window requires partitioning data by customer and ordering by timestamp, then applying a window function with a frame clause like RANGE BETWEEN INTERVAL '30' DAY PRECEDING AND CURRENT ROW (in SQL) or using a fixed-size window with a time-aware offset. A subtle behavior is that if a customer has no transactions in the last 30 days, the rolling average returns NULL, which must be handled (e.g., imputed with 0 or a global average) to avoid missing values in the model. In a real-world scenario, this feature is critical for churn prediction models where recent spending patterns are more indicative of customer behavior than lifetime aggregates.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the AI Associate exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AI Associate practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AI Associate practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AI Associate question test?

Data for AI — This question tests Data for AI — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Rolling average of purchase amounts over a 30-day window — Option B is correct because a rolling average over a 30-day window directly computes the average purchase amount per customer for only the most recent 30 days of transactions, which matches the requirement of a time-sensitive feature. This technique uses a sliding window function (e.g., AVG() with a ROWS or RANGE frame in SQL, or rolling().mean() in pandas) that respects the timestamp order, ensuring only relevant data contributes to the feature.

What should I do if I get this AI Associate question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More AI Associate practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AI Associate practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI Associate exam.