PHPackages                             arcticlinux/scientist-chances-fractional - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arcticlinux/scientist-chances-fractional

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arcticlinux/scientist-chances-fractional
========================================

A fractional chance class for daylerees/scientist

0.1.4(3y ago)08[2 PRs](https://github.com/arcticlinux/scientist-chances-fractional/pulls)MITPHPPHP &gt;=7.3

Since Feb 2Pushed 1y agoCompare

[ Source](https://github.com/arcticlinux/scientist-chances-fractional)[ Packagist](https://packagist.org/packages/arcticlinux/scientist-chances-fractional)[ RSS](/packages/arcticlinux-scientist-chances-fractional/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (9)Versions (6)Used By (0)

[![Scientist](scientist.png)](https://github.com/daylerees/scientist)

Scientist Fractional Chance
===========================

[](#scientist-fractional-chance)

[![Packagist Version](https://camo.githubusercontent.com/95206e253a25db1be6babcfbe79fc96e05078333b36ce85d5a339de27bf5ee28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7472656574696d652d63612f736369656e746973742d6368616e6365732d6672616374696f6e616c2e737667)](https://packagist.org/packages/treetime-ca/scientist-chances-fractional)[![Packagist](https://camo.githubusercontent.com/056a062a5dd47eea4533af60b0b643aea9583adcb23c24ce1f2e9fa02bcfaab4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472656574696d652d63612f736369656e746973742d6368616e6365732d6672616374696f6e616c2e737667)](https://packagist.org/packages/treetime-ca/scientist-chances-fractional)

Fractional chance class for use with the [Scientist Library](http://github.com/daylerees/scientist)

1. Installation
---------------

[](#1-installation)

Require the latest version of Scientist Chances Fractional using [Composer](https://getcomposer.org/).

```
composer require arcticlinux/scientist-chances-fractional

```

2. Usage
--------

[](#2-usage)

Using FractionalChance for experiment to run only 1 out of 100 times

```
$chance = new FractionalChance();
// Setting experiment to run 1%, 1/100 times, default 1 out of value sent to setProbability
$chance->setProbability(100);
// Explicitly setting probability to 1% or 1/100 chance
$chance->setProbability(100, 1);
$experiment = (new Scientist\Laboratory)
  ->experiment('experiment title')
  ->control($controlCallback)
  ->chance($chance)
  ->trial('trial name', $trialCallback)
  ->matcher($matcher);
```

Using FractionalChance for experiment to run 33.3%, 1/3 of the time

```
$chance = new FractionalChance();
$chance->setProbability(3,1);
$experiment = (new Scientist\Laboratory)
  ->experiment('experiment title')
  ->control($controlCallback)
  ->chance($chance)
  ->trial('trial name', $trialCallback)
  ->matcher($matcher);
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1247d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81b933074280053aed313018e78fa5f7d34a92435c2cd251563d3b50a92d13a5?d=identicon)[arcticlinux](/maintainers/arcticlinux)

---

Top Contributors

[![arcticlinux](https://avatars.githubusercontent.com/u/96047?v=4)](https://github.com/arcticlinux "arcticlinux (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![mbtreetime](https://avatars.githubusercontent.com/u/90357002?v=4)](https://github.com/mbtreetime "mbtreetime (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arcticlinux-scientist-chances-fractional/health.svg)

```
[![Health](https://phpackages.com/badges/arcticlinux-scientist-chances-fractional/health.svg)](https://phpackages.com/packages/arcticlinux-scientist-chances-fractional)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
