% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/power_one_sample.R
\name{power_t_one_sample}
\alias{power_t_one_sample}
\title{Compute Power for a One-Sample t-Test}
\usage{
power_t_one_sample(d, n, alpha = 0.05, tails = "two")
}
\arguments{
\item{d}{Numeric. The effect size (difference from the constant divided by sigma).}

\item{n}{Integer. Total sample size.}

\item{alpha}{Numeric. The significance level (default is 0.05).}

\item{tails}{Character. \code{"two"} for a two-tailed test or \code{"one"} for a one-tailed test.}
}
\value{
Numeric. The computed power (1 - beta).
}
\description{
Calculates the power for a one-sample t-test given the effect size (d),
total sample size (n), and significance level (alpha).
}
\examples{
# Calculate power for an effect size of 0.5 with n = 40 subjects
power_t_one_sample(d = 0.5, n = 40, alpha = 0.05)
}
