# Excessive unsuccessful bids (R025)

The ratio of winning bids to submitted bids for a top tenderer is a low outlier.

## Methodology

For each tenderer, the **ratio** is calculated as $numberOfWinningBids \over numberOfValidBids$ across all contracting processes.

A tenderer is flagged if:

- Its number of valid bids is greater than or equal to the **upper fence** of the third quartile ($Q_3$) of the set of numbers of valid bids.
- Its ratio is less than or equal to the **lower fence** of $Q_1 - 1.5(IQR)$, where $Q_1$ is the first quartile and $IQR$ is the interquartile range for the set of ratios.

:::{admonition} Example
:class: seealso

75% ($Q_3$) of bidders in Atlantis submitted at most 100 bids. UnethicalBid Ltd. submitted 150 bids. This is greater than the upper fence of 100. Therefore, UnethicalBid Ltd. is a top tenderer.

25% ($Q_1$) of bidders in Atlantis won at most half (`0.5`) of their bids. 75% ($Q_3$) of bidders won at most three quarters (`0.75`) of their bids. This yields a lower fence of one eighth (`0.125`).

UnethicalBid Ltd. won 15 of its 150 bids, or one tenth (`0.1`). This is less than the lower fence of one eighth. Therefore, UnethicalBid Ltd. is flagged.
:::

:::{admonition} Why is this a red flag?
:class: hint

A colluding bidder can mimic competition by submitting deliberately losing bids (at inflated bid prices, for example) in contracting processes in which a colluding partner participates.
:::

<small>Based on "Superfluous losing bidders" in [*Toolkit for detecting collusive bidding in public procurement*](https://www.govtransparency.eu/wp-content/uploads/2015/11/GTI_WP2014_2_Toth_et_al_150413.pdf) and "Top losers" in [*A decision support system for fraud detection in public procurement*](https://www.researchgate.net/publication/341703812_A_decision_support_system_for_fraud_detection_in_public_procurement).</small>

## Output

The indicator's value is the **ratio**, as a decimal.

## Configuration

All configuration is optional.

To override the default **upper fence**, add to your settings file, as a percentage:

```ini
[R025]
percentile = 75 # default
```

To override the default **lower fence**, add to your settings file, as a decimal:

```ini
[R025]
threshold = 0.05
```

:::{hint}
Put all properties under one `[R025]` section.
:::

## Exclusions

A contracting process is excluded if:

- An award's status is pending or invalid.
- There are multiple active awards (a.k.a. winning bids). [#14](https://github.com/open-contracting/cardinal-rs/issues/14)
- A bid is submitted by multiple tenderers. [#17](https://github.com/open-contracting/cardinal-rs/issues/17)
- An award is made to multiple suppliers. [#17](https://github.com/open-contracting/cardinal-rs/issues/17)

:::{note}
Do you want to eliminate an exclusion? Please contributed to the linked GitHub issue.
:::

## Demonstration

*Input*

:::{literalinclude} ../../../examples/R/025.jsonl
:language: json
:::

*Output*

```console
$ ocdscardinal indicators --settings docs/examples/R/025.ini --no-meta docs/examples/R/025.jsonl
{"Tenderer":{"F":{"R025":0.16666666666666666}}}

```
