# 064. Product browsing depth

**Question:** How does completed-session product browsing depth relate to conversion?

## Result

The largest computed metric is 0.3167 for (100.0, inf]; the smallest is 0.04118 for (0.0, 5.0]. Metric: rate (Purchase-session share).

Page counts are measured over the completed session and can be consequences of purchase intent.

![Product browsing depth](outputs/chart.png)

| depth | events | n | rate | wilson_lower | wilson_upper |
| --- | --- | --- | --- | --- | --- |
| (-1.0, 0.0] | 6 | 38 | 0.1579 | 0.07444 | 0.3042 |
| (0.0, 5.0] | 96 | 2331 | 0.04118 | 0.03384 | 0.05003 |
| (10.0, 25.0] | 568 | 3498 | 0.1624 | 0.1505 | 0.175 |
| (100.0, inf] | 229 | 723 | 0.3167 | 0.2839 | 0.3515 |
| (25.0, 50.0] | 509 | 2507 | 0.203 | 0.1877 | 0.2192 |
| (5.0, 10.0] | 185 | 1804 | 0.1025 | 0.08938 | 0.1174 |
| (50.0, 100.0] | 315 | 1429 | 0.2204 | 0.1997 | 0.2427 |

The chart shows 7 of 7 result rows; the table previews the first 7 in the analysis-defined order. [Download the full result table](outputs/results.csv). Numerical values are computed from the source; missing results stay unavailable.

## Method

Predeclared page-count bands and binomial rate intervals.

The study uses shared source preparation and reusable statistical routines. Its specific transformations are in [analysis.py](analysis.py), and common model/evaluation code is in [portfolio/methods.py](../../portfolio/methods.py). The [notebook](analysis.ipynb) executes the study and displays the saved results.

## Decision and limitations

Test a specific navigation change with random assignment rather than assuming more pages cause purchases.

One observation is a completed session. End-of-session behavior cannot support an early-session prediction claim. PageValues is excluded from purchase models because it can encode downstream purchase information. Associations are not experiment results. 

Related studies may share observations or holdouts. These are focused analytical studies, not independent replications or deployed business systems. Any model refinements informed by these results need new untouched evaluation data. No commercial impact is inferred from an association or backtest.

## Reproduce

From the repository root, after installing `requirements.txt`:

```powershell
python projects/064-product-browsing-depth/analysis.py
```

Source data are downloaded automatically if absent. Original archives are retained unchanged and checked by SHA-256. The cleaned cache normalizes column names; field-specific changes are visible in [data preparation](../../portfolio/data.py). Runtime evidence is in [receipt.json](outputs/receipt.json).

## Source

[Online Shoppers Purchasing Intention](https://archive.ics.uci.edu/dataset/468/online+shoppers+purchasing+intention+dataset), Sakar and Kastro (2018). [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source data are transformed and aggregated in this study. [Source provenance](../../data/provenance/shoppers.json) and [prepared-data audit](../../data/provenance/shoppers_prepared.json) record the downloaded files, field coverage and hashes.
