A Python package to calculate the number of allowed devations for tests of internal control effectiveness or ineffectiveness.
Project description
fam450
A Python package to calculate the number of allowed deviations for tests of internal control effectiveness or ineffectiveness following Financial Audit Manual Section 450.
Installation
pip install fam450
Quick Start
from fam450 import fam450ss
# Initialize with sample size of 158, tolerable rate of deviation of 5%,
# and risk of overreliance of 10%
audit_test = fam450ss(n=158, trd=0.05, ovr=0.1)
# Calculate allowed deviations for testing effectiveness (less than alternative)
max_deviations = audit_test.allowed_deviations(alt='less')
print(f"Maximum allowed deviations for effectiveness: {max_deviations}")
# Display detailed results
audit_test.detailed_results()
# Calculate allowed deviations for testing ineffectiveness (greater than alternative)
min_deviations = audit_test.allowed_deviations(alt='greater')
print(f"Minimum deviations to conclude ineffectiveness: {min_deviations}")
# Display simple results
audit_test.simple_results()
API Reference
fam450ss(n, trd, ovr)
Class for Financial Audit Manual Section 450 sample size calculations.
Parameters:
n(int): Sample sizetrd(float): Tolerable rate of deviation (as decimal, e.g., 0.05 for 5%)ovr(float): Risk of overreliance (e.g., 0.1 for 10%, which is 1 - confidence level)
Methods:
allowed_deviations(alt)
Calculate the allowed number of deviations for the given alternative hypothesis.
Parameters:
alt(str): Alternative hypothesis ('less' for effectiveness testing, 'greater' for ineffectiveness testing)
Returns:
int: Number of allowed deviations
detailed_results()
Print detailed results of the allowed deviations calculation including hypothesis statements and interpretation.
simple_results()
Print concise results of the allowed deviations calculation.
Helper Functions
fam450lt()
Generate table of allowed deviations for the "less than" alternative hypothesis (testing effectiveness).
Returns:
pandas.DataFrame: Table with allowed deviations for various sample sizes and tolerable deviation rates
fam450gt()
Generate table of allowed deviations for the "greater than" alternative hypothesis (testing ineffectiveness).
Returns:
pandas.DataFrame: Table with allowed deviations for various sample sizes and tolerable deviation rates
Example Output
from fam450 import fam450ss, fam450lt, fam450gt
# Testing internal control effectiveness
audit = fam450ss(n=158, trd=0.05, ovr=0.1)
audit.allowed_deviations(alt='less')
# Returns: 4
audit.simple_results()
# Output: 4 is the maximum number of allowed deviations that an experimenter
# has enough evidence to determine the internal controls are effective.
audit.detailed_results()
# Null Hypothesis: The true tolerable rate of deviation is 5% or more.
# Alternative Hypothesis: The true tolerable rate of deviation is less than 5%.
# If the experimenter observes 4 deviations or less in a sample size of
# 158 (2.53%), they can reject with 90% confidence the null hypothesis that
# the true tolerable rate of deviation is 5% or more in favor of the
# alternative that it's less than 5%. If the experimenter observes more
# than 4 deviations, they fail to reject the null hypothesis, but cannot
# say the true tolerable rate of deviation is 5% or more.
# Generate FAM 450 tables
effectiveness_table = fam450lt()
print(effectiveness_table)
ineffectiveness_table = fam450gt()
print(ineffectiveness_table)
Requirements
- Python ≥ 3.9
- scipy
- pandas
Development
git clone https://github.com/wkingc/fam450-corrected-py-package.git
cd fam450-corrected-py-package
pip install -e ".[dev]"
python -m pytest
License
MIT License. See LICENSE for details.
Documentation
For a complete usage guide, see https://www.kingcopeland.com/fam450-corrected-py/.
Citation
If you use this package in your work, please consider citing it:
@software{copeland2026fam450,
author = {Wade K. Copeland},
title = {{fam450: A Python package to calculate the number of allowed deviations for tests of internal control effectiveness or ineffectiveness}},
url = {https://pypi.org/project/fam450/},
version = {0.1.0},
year = {2026}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fam450-0.1.0.tar.gz.
File metadata
- Download URL: fam450-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45822b50b83abe0e48a9ff60e2ac37a2cc564ed85f1ca78b40bda49900ab045d
|
|
| MD5 |
23358c6d5998fb4ffb033d7c721c887e
|
|
| BLAKE2b-256 |
aeb4d9fd493614b60b531fcd4a88116f6a027cc8eb79909f1ecca24a2a0904bf
|
File details
Details for the file fam450-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fam450-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca22c9f2b1aeb8fe272fbc30bd1eaad8ef7bc789db1184405c4a2ca83bff2e9
|
|
| MD5 |
f5156f1857fc9133119ef31ac0b8d91a
|
|
| BLAKE2b-256 |
7d839692d85b50c52a1907d14d86520ef7b03fa8dcaeb3e48efe64a488e96b09
|