Skip to main content

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 size
  • trd (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: Four 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
  • num2words

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.1},
    year = {2026}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fam450-0.1.1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fam450-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file fam450-0.1.1.tar.gz.

File metadata

  • Download URL: fam450-0.1.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fam450-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f2fa7ca43a1aa5d14610eaf9606ce8024a4a6509a9a9558a5518829e6556ec1b
MD5 d464857ddb37f7a0415bff2f491bb3f8
BLAKE2b-256 63736e4dc33568dfff1c5b87bd8ac45d3b649b777a388089d50fc76b6dda9d4b

See more details on using hashes here.

File details

Details for the file fam450-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fam450-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fam450-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29ee8154808672706c45cf7f489f26c8367dcac49a3db3443de6796b661954af
MD5 ad16d2b6dd8d145f7dc2bfbbeacbbbea
BLAKE2b-256 d283cd6244d226cdbd54ea8eb8cee3db079f82b02660ccdc1195a1e0a79179e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page