# Pull rates and expected value

## Pull rates

`Set.pullRates` gives the per-pack odds of each rarity from a published opening study (mostly TCGplayer Infinite's), with its sample size, confidence interval, link and date. 21 English sets are covered, from Scarlet & Violet to Pitch Black.

```graphql
{
  set(code: "me03") {
    packLayout { slot count }
    pullRates { rarity slot pattern probability odds ci samplePacks source sourceUrl observedOn }
  }
}
```

- `probability` is per pack (0–1). `odds` is as published, e.g. "1 in 81".
- `slot` is where the rarity appears: `rare`, or `reverse_1` / `reverse_2`, the two reverse-holo slots. Either reverse slot can upgrade, e.g. to an ACE SPEC or Illustration rare.
- `pattern` is set for Poké Ball / Master Ball reverse patterns (Prismatic Evolutions, Black Bolt, White Flare).
- A set with no study on file returns an empty list. Shrouded Fable, 30th Celebration and all Japanese sets are not covered yet.

## Expected value

`Set.expectedValue` is what one booster pack is worth on average at today's Cardmarket prices (euros by default; pass `currency: USD` for dollars, converted at the ECB rate). It is the sum, over the pack layout, of the probability of each outcome × the mean price of the cards in that outcome:

- Commons and uncommons: count × their mean price.
- Each reverse slot: a plain reverse holo, unless it upgrades to the rarities or patterns listed for that slot.
- The rare slot: Rare, unless it upgrades (Double rare, Ultra Rare, …).

```graphql
{
  set(code: "sv03.5") {
    expectedValue {
      total currency asOf priceCoverage samplePacks sources caveats
      lines { label slot quantity probability unitValue contribution cardCount pricedCount }
    }
  }
}
```

`SealedProduct.expectedValue` adds up its packs (at their set's per-pack EV), priced promo cards and nested products. Anything it can't value, like "1 of 4 promos", is listed in `caveats` and not counted. Compare it with the product's `price` and `msrp`, minding the currencies.

**Read the caveats.** EV assumes every card of a rarity is equally likely. It values bulk at Cardmarket trend, which is more than bulk really sells for, and it ignores fees and shipping. `priceCoverage` below 1 means some cards had no price; their rarity's mean uses the priced ones. Over MCP, `set_pull_rates` returns rates and EV in one call.
