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.2},
    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.2.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.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fam450-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 54b32717672e39d10bf83d97575694727a55736729cbda754eb46ab8e2822b64
MD5 b0b4d553976b13fb679eb2d7cd1eadea
BLAKE2b-256 41da50a56676344feeca31d3e83d45348210896cb2017cae1c11905be9186660

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fam450-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5f9803fe75ff7e4cb454dac8df605a0872bc5642d6eda274bf519494a9a05d
MD5 2ed01092d03e9d48be29dd3836bfe163
BLAKE2b-256 4a56976611f3e15c0551716722791476b4f645e83215d19708c1dc96f9121eb7

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