Description
Apply a discount to nonexcluded basket items.
Consumer-study records can describe exposure, recall, option availability and purchase-value bases. Local record arithmetic preserves a supplied study or billing convention without measuring preferences, establishing memory accuracy or determining consumer rights.
Apply a discount to nonexcluded basket items.
When to use this tool
Use Basket Discount Base Exclusion when checking a supplied consumer-record, recall-window, choice or basket convention.
How to use the tool and how it works
- Enter itemValues, excluded, discountFraction. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read base, discount, total. Use the output convention below.
Apply a discount to nonexcluded basket items. Require aligned nonnegative itemValues/excluded and discountFraction in [0,1]; base sums nonexcluded values, discount = base*fraction, total = all values-discount.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| itemValues | Item Values | Required. Array of finite number; maximum items 256. |
| excluded | Excluded | Required. Array of boolean; maximum items 256. |
| discountFraction | Discount Fraction Unit: 1. | Required. Finite number; minimum 0; maximum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| base | Base | Required. Finite number. |
| discount | Discount | Required. Finite number. |
| total | Total | Required. Finite number. |
{
"input": {
"itemValues": [
20,
30
],
"excluded": [
false,
true
],
"discountFraction": 0.1
},
"output": {
"base": 20,
"discount": 2,
"total": 48
}
} Limitations and assumptions
- Eligibility, tax basis and actual merchant policy are supplied rather than verified.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use actual study data, validated measurement methods and applicable merchant/consumer rules for substantive behavioral or transaction conclusions.
References
Similar or alternative tools
- Basket Item Share Gap
Compare item-value share with a reference share.
- Consumer Choice Available Option Budget
Count available choice options after overlapping exclusions.