Chi-Squared English Fitness Scorer
Score actual letters against explicit independently supplied English frequency model, no hidden English corpus, chi-square significance or cipher identity inference.
Description
A Pearson letter-fit score compares observed counts with a supplied positive frequency model.
A Pearson letter-fit score compares observed counts with a supplied positive frequency model.1
Its value is a corpus-dependent fitness measure rather than a reported p-value. Use Chi-Squared English Fitness Scorer to evaluate the supplied inputs under the specific model below.
When to use Chi-Squared English Fitness Scorer
Use Chi-Squared English Fitness Scorer to evaluate the supplied inputs under the specific model below. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
How to use Chi-Squared English Fitness Scorer and understand its results
- Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
- Enter Text, Caller alphabet, Caller expected frequencies using the field table and validation rules below, then run the tool.
- Read Pearson letter fitness, Observed counts and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| text | Text | string | Required; constraints below |
| callerAlphabet | Caller alphabet | string | Required; constraints below |
| callerExpectedFrequencies | Caller expected frequencies | array of number | Required; constraints below |
Enter nonempty uppercase A–Z text restricted to a unique reference alphabet and aligned strictly positive expected frequencies whose sum differs from 1 by at most 1e−10. Count every alphabet letter and sum (observed−n×frequency)²/(n×frequency). Return the statistic without a p-value, key choice or installed English model.
χ² = Σletters (observedCount−n×expectedFrequency)²/(n×expectedFrequency) Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| pearsonLetterFitness | Pearson letter fitness | number |
| observedCounts | Observed counts | array of number |
{
"input": {
"text": "AABB",
"callerAlphabet": "AB",
"callerExpectedFrequencies": [
0.5,
0.5
]
},
"output": {
"pearsonLetterFitness": 0,
"observedCounts": [
2,
2
]
}
} Limitations and assumptions
Its value is a corpus-dependent fitness measure rather than a reported p-value. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use Bigram English Fitness Score for a related task: Bigram fitness sums corpus-dependent log scores for adjacent symbol pairs.
Use Letter Frequency Rank Compare Tool for a related task: Letter-frequency ranking depends on the submitted sample and expected ordering.
References
-
Chi-Squared English Fitness Scorer — tool.io
Similar or alternative tools
- Bigram English Fitness Score
Bigram fitness sums corpus-dependent log scores for adjacent symbol pairs.
- Letter Frequency Rank Compare Tool
Letter-frequency ranking depends on the submitted sample and expected ordering.