9+ Python Confidence Interval Calculators


9+ Python Confidence Interval Calculators

Estimating a range within which a population parameter likely falls is a fundamental statistical task. In Python, this is often achieved using libraries like NumPy, SciPy, and Statsmodels. For instance, one might determine the 95% confidence interval for the mean of a dataset, providing a range where the true population mean is expected to lie 95% of the time. This process typically involves calculating the sample mean, standard deviation, and utilizing appropriate statistical distributions like the t-distribution or normal distribution, depending on sample size and known population variance.

Accurate interval estimation is critical for data analysis and interpretation across various fields, from scientific research to business analytics. It allows for informed decision-making by quantifying the uncertainty associated with sample-based estimations. Historically, the development of these statistical methods revolutionized scientific inquiry by providing a framework for drawing inferences about populations from limited samples. These techniques enable researchers to move beyond point estimates and grasp the potential variability inherent in their data.

This foundation in statistical inference is essential for exploring related concepts such as hypothesis testing, sample size determination, and different types of confidence intervals. Understanding these interconnected concepts provides a robust toolkit for data analysis and strengthens the interpretation of statistical results.

1. Statistical Inference

Statistical inference forms the bedrock of calculating confidence intervals in Python. It provides the theoretical framework for drawing conclusions about populations based on limited sample data. Understanding this connection is crucial for interpreting the results of confidence interval calculations and making informed decisions based on data.

  • Estimation of Population Parameters

    Confidence intervals are a core component of statistical inference used to estimate population parameters, such as the mean, variance, or proportion. For example, a retailer might use sales data from a sample of stores to estimate the average sales across all stores. The confidence interval provides a range within which the true average sales likely fall, quantifying the uncertainty inherent in the sample-based estimation.

  • Uncertainty Quantification

    Statistical inference acknowledges the inherent uncertainty in working with sample data. Confidence intervals quantify this uncertainty by providing a range of plausible values, rather than a single point estimate. This range is determined by the chosen confidence level, reflecting the probability that the true population parameter lies within the interval. For instance, a 95% confidence interval indicates that if the sampling process were repeated many times, 95% of the calculated intervals would contain the true population parameter.

  • Hypothesis Testing Connection

    Confidence intervals are closely related to hypothesis testing. They provide another way to assess the statistical significance of findings. A confidence interval that does not contain the null hypothesis value suggests evidence against the null hypothesis. For example, if a 95% confidence interval for the difference in treatment effects between two groups does not include zero, it suggests a statistically significant difference between the groups.

  • Practical Application in Python

    Python libraries such as SciPy and Statsmodels provide powerful tools for performing statistical inference, including the calculation of confidence intervals. These libraries offer functions to calculate confidence intervals for various parameters and distributions, making it easy to apply statistical inference principles to real-world datasets.

By understanding the principles of statistical inference, users of Python’s statistical libraries can gain deeper insights from data. The calculated confidence intervals become more than just numerical ranges; they represent quantifiable measures of uncertainty, providing a robust foundation for decision-making based on evidence from sample data.

2. Sample Data

Sample data plays a crucial role in calculating confidence intervals within Python. These intervals provide a range of plausible values for a population parameter based on the information extracted from a subset of the population. The quality and characteristics of the sample data directly impact the reliability and interpretability of the calculated confidence intervals.

  • Representativeness

    A representative sample accurately reflects the characteristics of the larger population from which it is drawn. For example, a survey aiming to estimate average household income should sample households from different income brackets proportionally to the population distribution. A non-representative sample can lead to biased confidence intervals that do not accurately reflect the true population parameter. In Python, achieving representativeness often requires careful sampling design and consideration of potential biases.

  • Sample Size

    The size of the sample affects the precision of the confidence interval. Larger samples generally lead to narrower intervals, providing a more precise estimate of the population parameter. For instance, estimating the average height of adults with a sample of 1000 individuals will yield a more precise confidence interval than a sample of 100 individuals. Python libraries allow for calculating confidence intervals with varying sample sizes, demonstrating the impact of sample size on interval width.

  • Data Quality

    The accuracy and completeness of the sample data are essential for reliable confidence interval calculations. Errors or missing data can lead to distorted intervals. For example, if a dataset tracking patient recovery times contains errors in the recorded times, the resulting confidence interval for the average recovery time will be unreliable. Data cleaning and preprocessing techniques in Python are crucial for ensuring data quality before calculating confidence intervals.

  • Sampling Method

    Different sampling methods, such as random sampling, stratified sampling, or cluster sampling, can influence the properties of the confidence interval. The choice of sampling method should align with the research question and the characteristics of the population. For instance, if studying the prevalence of a disease in different age groups, stratified sampling by age group might be appropriate. Python libraries can accommodate various sampling methods in confidence interval calculations, reflecting the impact of sampling strategy on the results.

These facets of sample data underscore its critical role in calculating confidence intervals using Python. Understanding these elements ensures the accurate and meaningful interpretation of confidence intervals, providing robust insights into population parameters based on the available sample data. By carefully considering these aspects, researchers and analysts can leverage Python’s statistical capabilities to draw reliable conclusions from their data.

3. Normal Distribution

The normal distribution, also known as the Gaussian distribution, plays a foundational role in calculating confidence intervals in Python, particularly when dealing with large sample sizes or when the population standard deviation is known. Its symmetrical bell shape and well-defined properties make it a cornerstone of statistical inference.

  • Central Limit Theorem

    The central limit theorem states that the distribution of sample means approaches a normal distribution as the sample size increases, regardless of the original population distribution. This theorem is crucial for applying normal distribution-based confidence interval calculations even when the underlying population isn’t normally distributed, provided the sample size is sufficiently large. For instance, even if the distribution of individual customer purchase amounts is skewed, the distribution of the average purchase amount across multiple large samples will approximate a normal distribution.

  • Z-score and Confidence Level

    The normal distribution’s standardized form, characterized by a mean of zero and a standard deviation of one, allows for the use of z-scores. Z-scores represent the number of standard deviations a data point is from the mean. In confidence interval calculations, z-scores corresponding to the desired confidence level (e.g., 1.96 for a 95% confidence interval) are used to determine the margin of error. This standardized approach simplifies calculations and facilitates comparisons across different datasets.

  • Known Population Standard Deviation

    When the population standard deviation is known, the normal distribution is directly applicable for calculating confidence intervals, regardless of the sample size. This scenario is less common in practice but provides a direct link between the normal distribution and confidence interval estimation. For example, if a manufacturer knows the population standard deviation of the weight of their product from historical data, they can use the normal distribution to calculate a confidence interval for the average weight of a newly produced batch.

  • Python Implementation

    Python libraries such as SciPy and Statsmodels leverage the normal distribution for confidence interval calculations. These libraries provide functions that simplify the process by incorporating z-scores and standard deviations directly into the calculations. This readily available functionality facilitates the application of normal distribution principles to various datasets and research questions.

The properties of the normal distribution and its connection to the central limit theorem make it a powerful tool for confidence interval calculations in Python. By leveraging these properties, researchers and analysts can estimate population parameters with quantifiable levels of confidence, even when the underlying population distribution is unknown, as long as sample sizes are sufficiently large. Python’s statistical libraries streamline this process, enabling efficient and accurate confidence interval estimation based on the principles of the normal distribution.

4. T-distribution

The t-distribution is essential for calculating confidence intervals in Python, especially when dealing with small sample sizes or when the population standard deviation is unknown. Unlike the normal distribution, the t-distribution’s shape varies based on the degrees of freedom, which are directly related to the sample size. This adaptability makes it a robust tool for statistical inference in situations where the normal distribution’s assumptions might not hold.

  • Degrees of Freedom

    Degrees of freedom, calculated as the sample size minus one, influence the shape of the t-distribution. Smaller sample sizes result in heavier tails and a wider distribution, reflecting greater uncertainty due to limited data. Larger sample sizes lead to a t-distribution that closely resembles the normal distribution. For example, a sample size of 10 yields 9 degrees of freedom and a wider distribution, while a sample size of 100 yields 99 degrees of freedom and a distribution closer to normal.

  • Unknown Population Standard Deviation

    In many real-world scenarios, the population standard deviation is unknown and must be estimated from the sample data. The t-distribution accounts for this added uncertainty by providing wider confidence intervals compared to the normal distribution when using the same confidence level. This adjustment ensures that the intervals accurately reflect the uncertainty associated with both the sample mean and the estimated standard deviation. For instance, when estimating the average lifespan of a new type of lightbulb based on a small sample, the t-distribution provides a more realistic confidence interval than assuming a known population standard deviation.

  • Small Sample Sizes

    When dealing with small sample sizes (typically less than 30), the t-distribution is preferred over the normal distribution for confidence interval calculations. The t-distribution’s heavier tails account for the increased variability and uncertainty associated with small samples. This adjustment is crucial for obtaining accurate confidence intervals that reflect the limitations of the available data. For example, when analyzing the effectiveness of a new drug with a limited number of participants, the t-distribution ensures a more reliable confidence interval for the treatment effect.

  • Python Implementation

    Python libraries such as SciPy and Statsmodels provide functions for easily calculating confidence intervals using the t-distribution. These functions take the sample data, desired confidence level, and degrees of freedom as input, simplifying the process of applying the t-distribution to real-world datasets. This accessibility enables efficient and accurate confidence interval estimation, even with limited sample sizes or unknown population standard deviations. For instance, the scipy.stats.t.interval() function directly calculates the confidence interval based on the t-distribution.

The t-distribution provides a robust framework for calculating confidence intervals in Python, especially when sample sizes are small or the population standard deviation is unknown. By accounting for the degrees of freedom and the uncertainty associated with estimated standard deviations, the t-distribution ensures reliable confidence intervals that accurately reflect the available data. Leveraging Python’s statistical libraries simplifies the application of the t-distribution, enabling researchers and analysts to draw meaningful insights from their data even with limited sample sizes.

5. Margin of Error

The margin of error is a critical component in calculating confidence intervals within Python. It quantifies the uncertainty associated with estimating a population parameter based on a sample. Understanding the margin of error is essential for interpreting the confidence interval and drawing meaningful conclusions from data.

  • Relationship with Confidence Interval Width

    The margin of error directly determines the width of the confidence interval. A larger margin of error results in a wider interval, indicating greater uncertainty in the estimate. Conversely, a smaller margin of error leads to a narrower, more precise interval. For example, a 95% confidence interval for average customer satisfaction with a margin of error of 3% would range from, say, 72% to 78% satisfaction. A smaller margin of error, such as 1%, would result in a narrower interval, indicating a more precise estimate.

  • Influence of Sample Size

    Sample size significantly impacts the margin of error. Larger sample sizes generally lead to smaller margins of error and narrower confidence intervals. This is because larger samples provide more information about the population, reducing the uncertainty in the estimate. For instance, surveying 1000 customers will likely yield a smaller margin of error for estimated average satisfaction compared to surveying only 100 customers. Python calculations readily demonstrate this relationship.

  • Impact of Confidence Level

    The desired confidence level directly influences the margin of error. Higher confidence levels, such as 99%, require larger margins of error to accommodate the increased certainty. Lower confidence levels, such as 90%, result in smaller margins of error but with less certainty about capturing the true population parameter. For example, a 99% confidence interval will be wider than a 95% confidence interval for the same data, reflecting the higher certainty required. Python libraries allow for calculating confidence intervals with varying confidence levels, demonstrating the associated changes in margin of error.

  • Practical Implications

    The margin of error has important practical implications for decision-making. It helps quantify the potential variability around an estimated value. For instance, a political poll showing a candidate with a 45% support rate and a margin of error of 3% suggests the true support could range from 42% to 48%. This range informs campaign strategies and resource allocation. Understanding the margin of error is crucial for interpreting poll results and making informed decisions based on the data.

In Python, the margin of error is integral to the calculation and interpretation of confidence intervals. It provides a crucial measure of uncertainty, allowing for a more nuanced understanding of the estimated population parameters. By considering the interplay between margin of error, sample size, and confidence level, analysts can draw more robust conclusions and make better-informed decisions based on the available data. Python’s statistical libraries facilitate these calculations and allow for exploring the impact of different factors on the margin of error and confidence interval width, promoting sound statistical reasoning.

6. Confidence Level

Confidence level is a crucial parameter in calculating confidence intervals within Python. It quantifies the degree of certainty that the calculated interval contains the true population parameter. A higher confidence level indicates greater certainty, but also results in a wider interval. Understanding the role of confidence level is essential for interpreting the results and drawing meaningful conclusions from data.

  • Probability of Capturing the True Parameter

    The confidence level represents the long-run proportion of confidence intervals that would contain the true population parameter if the sampling process were repeated many times. For instance, a 95% confidence level implies that 95 out of 100 confidence intervals constructed from repeated samples would contain the true parameter. The remaining 5% of intervals would not capture the true value. This probabilistic interpretation is central to understanding the meaning of a confidence interval.

  • Trade-off between Certainty and Precision

    Choosing a confidence level involves a trade-off between certainty and precision. Higher confidence levels, like 99%, offer greater certainty but result in wider intervals, reducing precision. Lower confidence levels, like 90%, offer greater precision with narrower intervals, but at the cost of reduced certainty. The appropriate confidence level depends on the specific application and the relative importance of certainty versus precision. For example, in medical applications, a higher confidence level might be preferred, while in market research, a lower confidence level might be acceptable.

  • Commonly Used Confidence Levels

    Certain confidence levels are commonly used in practice, with 95% being the most prevalent. Other frequently used levels include 90% and 99%. The choice often reflects established conventions within specific fields or the level of risk acceptable for a particular decision. While Python allows for calculating confidence intervals at any desired level, adhering to established conventions facilitates comparability across studies and promotes clear communication of results. For instance, reporting a 95% confidence interval aligns with common practice and avoids potential misinterpretations.

  • Impact on Margin of Error

    Confidence level directly influences the margin of error. Higher confidence levels require larger margins of error to accommodate the increased certainty. This wider interval reflects the increased likelihood of capturing the true population parameter. Conversely, lower confidence levels result in smaller margins of error and narrower intervals, but with a reduced probability of containing the true parameter. This relationship between confidence level and margin of error is fundamental to understanding how confidence intervals are constructed and interpreted within Python’s statistical framework.

The choice of confidence level significantly impacts the interpretation and utility of confidence intervals calculated in Python. By understanding the relationship between confidence level, margin of error, and precision, researchers and analysts can select appropriate confidence levels for their specific needs, ensuring that the calculated intervals provide meaningful and reliable insights into population parameters based on the available data. Python libraries offer the flexibility to explore the impact of varying confidence levels on the resulting intervals, supporting sound statistical decision-making.

7. SciPy Library

The SciPy library plays a crucial role in calculating confidence intervals within Python. Its scipy.stats module provides a comprehensive set of statistical functions, including those specifically designed for confidence interval estimation. This functionality makes SciPy a powerful tool for quantifying uncertainty and drawing inferences from data.

The scipy.stats.t.interval() function, for example, calculates the confidence interval for the mean of a population based on the t-distribution. This function is particularly useful when dealing with small sample sizes or when the population standard deviation is unknown. Users provide the desired confidence level, degrees of freedom (calculated from the sample size), sample mean, and sample standard deviation. The function returns the lower and upper bounds of the confidence interval. This direct calculation simplifies the process of estimating population parameters with a quantifiable level of confidence. Consider a researcher studying the effectiveness of a new fertilizer on crop yield. With yield data from a limited number of experimental plots, scipy.stats.t.interval() allows them to calculate a confidence interval for the average yield improvement, accounting for the uncertainty associated with the small sample size. Similarly, scipy.stats.norm.interval() calculates confidence intervals based on the normal distribution. This function is appropriate when dealing with large sample sizes or when the population standard deviation is known. For example, a quality control analyst at a manufacturing plant might use scipy.stats.norm.interval() to determine the 95% confidence interval for the average weight of manufactured components, using a large sample of components and the known population standard deviation derived from historical data. This allows them to assess whether the manufacturing process is operating within acceptable tolerances.

SciPy’s efficient implementation of these and other related functions streamlines the process of calculating confidence intervals, enabling analysts and researchers to focus on the interpretation of the results rather than the computational details. The librarys robust handling of different statistical distributions empowers users to select the most appropriate method for their specific dataset and research question, facilitating rigorous statistical analysis and informed decision-making. However, while SciPy simplifies calculations, understanding the underlying statistical assumptions and choosing the correct function based on the characteristics of the data remain crucial for obtaining valid and interpretable confidence intervals. Failure to consider these aspects can lead to inaccurate or misleading conclusions.

8. Statsmodels library

The Statsmodels library significantly enhances the capability to calculate confidence intervals within Python, extending beyond the functionalities provided by SciPy. Statsmodels offers specialized tools for various statistical models, including linear regression, generalized linear models, and time series analysis. This specialized focus allows for the calculation of confidence intervals not only for individual population parameters, like the mean, but also for model coefficients, predictions, and other relevant statistics.

A key strength of Statsmodels lies in its comprehensive output. When fitting a statistical model, Statsmodels provides detailed summaries including confidence intervals for the estimated coefficients. This facilitates direct interpretation of the model’s output and assessment of the statistical significance of the relationships between variables. For instance, when analyzing the impact of advertising spend on sales using linear regression, Statsmodels not only estimates the relationship but also provides confidence intervals for the estimated effect of advertising. A narrow confidence interval not including zero suggests a statistically significant relationship between advertising and sales. Furthermore, Statsmodels allows for the calculation of prediction intervals, providing a range within which future observations are likely to fall, given the fitted model. This capability is essential for forecasting and risk assessment. For example, a financial analyst might use Statsmodels to model stock prices and calculate prediction intervals, informing investment decisions by quantifying the potential range of future stock values.

Leveraging Statsmodels for confidence interval calculation enhances the depth and breadth of statistical analysis within Python. Its specialized functionalities empower researchers and analysts to move beyond simple parameter estimation, providing tools to assess the uncertainty associated with complex statistical models and their predictions. However, the correct application of Statsmodels requires understanding the assumptions underlying each statistical model and selecting the appropriate model based on the characteristics of the data. Failure to consider these aspects can lead to misspecified models and unreliable confidence intervals. Therefore, while Statsmodels provides powerful tools, careful consideration of statistical principles remains paramount for drawing valid inferences from data.

9. Interval Estimation

Interval estimation provides the foundational framework for calculating confidence intervals within Python. Confidence intervals are a specific type of interval estimate, aiming to capture a population parameter within a defined range, along with a quantifiable level of confidence. Python, through libraries like SciPy and Statsmodels, provides the computational tools to construct these intervals, bridging the gap between statistical theory and practical application. The process involves using sample data to calculate the interval’s boundaries, effectively estimating the range within which the true population parameter likely falls. For instance, estimating the average customer satisfaction score for a company based on a sample survey involves calculating a confidence interval, a form of interval estimation, to express the likely range of the true satisfaction score across all customers.

The importance of interval estimation within the context of Python’s confidence interval calculations lies in its ability to quantify uncertainty. Point estimates, like a sample mean, offer a single value but lack insight into the potential variability of the true population parameter. Interval estimation addresses this limitation by providing a range of plausible values. The width of this interval reflects the level of uncertainty, influenced by factors such as sample size and chosen confidence level. For example, a marketing team using Python to analyze campaign effectiveness might calculate confidence intervals for click-through rates on different ad variations. Wider intervals indicate greater uncertainty, potentially suggesting the need for larger sample sizes or further investigation, while narrower intervals offer more precise estimates, supporting more confident decision-making.

Practical applications of interval estimation using Python are numerous and impactful. In clinical trials, researchers utilize Python to compute confidence intervals for the effectiveness of new treatments, providing a range within which the true treatment effect likely lies. Financial analysts employ Python to estimate confidence intervals for portfolio returns, quantifying the potential range of investment outcomes. Manufacturing companies utilize Python to calculate confidence intervals for product quality metrics, allowing them to assess process stability and adherence to specifications. In each case, the fundamental principles of interval estimation enable the quantification of uncertainty, enhancing decision-making by providing a realistic range of plausible values rather than relying solely on point estimates. The robust statistical framework and computational power of Python, coupled with a clear understanding of interval estimation principles, empower informed decision-making across diverse fields.

Frequently Asked Questions

This section addresses common queries regarding confidence interval calculation in Python, providing concise and informative responses.

Question 1: How does sample size affect confidence intervals?

Larger sample sizes generally lead to narrower confidence intervals, reflecting increased precision in estimating the population parameter. Smaller samples result in wider intervals, indicating greater uncertainty.

Question 2: What is the difference between a 95% and a 99% confidence interval?

A 99% confidence interval is wider than a 95% confidence interval, reflecting greater certainty that the true population parameter falls within the interval. The trade-off is a less precise estimate.

Question 3: When should one use the t-distribution instead of the normal distribution?

The t-distribution is preferred when the population standard deviation is unknown or when dealing with small sample sizes (typically less than 30). The normal distribution is appropriate when the population standard deviation is known and the sample size is large.

Question 4: How does the margin of error relate to the confidence interval?

The margin of error represents half the width of the confidence interval. It quantifies the uncertainty associated with the estimate. A larger margin of error indicates a wider interval and greater uncertainty.

Question 5: What are common pitfalls to avoid when calculating confidence intervals in Python?

Common pitfalls include using the wrong statistical distribution (normal vs. t-distribution), incorrectly calculating degrees of freedom, or misinterpreting the meaning of the confidence level. Ensuring proper data handling and applying appropriate statistical assumptions are crucial.

Question 6: How can confidence intervals inform decision-making?

Confidence intervals provide a range of plausible values for a population parameter, rather than a single point estimate. This range allows for a more nuanced understanding of uncertainty, supporting better-informed decisions by considering the potential variability of the true parameter value.

Understanding these key aspects of confidence interval calculation promotes accurate interpretation and application within statistical analysis using Python.

The subsequent sections will delve further into practical examples and advanced techniques related to confidence interval calculation in Python, building upon the foundational knowledge presented here.

Practical Tips for Confidence Interval Calculation in Python

Effective use of Python for confidence interval estimation requires attention to detail and a solid understanding of statistical principles. The following tips offer practical guidance for robust and accurate calculations.

Tip 1: Verify Sample Data Appropriateness

Ensure sample data aligns with the chosen statistical method. Normal distribution-based methods assume approximately normally distributed data, especially for smaller sample sizes. Consider data transformations or non-parametric methods if this assumption isn’t met. Examine the dataset for outliers and missing values, as these can significantly impact results.

Tip 2: Select Appropriate Statistical Distributions

Employ the t-distribution for small sample sizes or unknown population standard deviations. Utilize the normal distribution for large samples with known population standard deviations. Justify distribution choices based on data characteristics and research objectives.

Tip 3: Leverage Library Functions Correctly

Utilize appropriate functions within SciPy and Statsmodels. Understand function parameters and interpret outputs correctly. For instance, scipy.stats.t.interval() requires degrees of freedom, while scipy.stats.norm.interval() requires the population standard deviation if known.

Tip 4: Interpret Confidence Levels Accurately

Recognize that a 95% confidence interval doesn’t guarantee the true parameter falls within the calculated interval in every instance. It implies that 95% of similarly constructed intervals from repeated samples would capture the true parameter. Avoid overstating the certainty of individual intervals.

Tip 5: Consider the Margin of Error

Interpret the margin of error alongside the confidence interval. The margin of error reflects the precision of the estimate. Larger margins indicate greater uncertainty. Communicate the margin of error clearly when presenting results to facilitate accurate interpretation.

Tip 6: Visualize Confidence Intervals

Utilize visualization libraries such as Matplotlib or Seaborn to graphically represent confidence intervals. Visualizations enhance understanding and communication of results, particularly when comparing intervals across multiple groups or conditions. Error bars on bar charts or line plots effectively convey uncertainty.

Tip 7: Validate Results

Perform sensitivity analyses by varying sample sizes, confidence levels, or statistical methods to assess the robustness of findings. Cross-validate results with different datasets or statistical software when possible. Validation strengthens confidence in the reliability of conclusions.

By adhering to these tips, analyses using Python achieve greater accuracy and reliability in confidence interval estimation, fostering robust statistical inference and informed decision-making.

The concluding section summarizes key principles and highlights the broader implications of confidence interval analysis within Python for diverse research and analytical applications.

Conclusion

Accurate estimation of population parameters from sample data is fundamental to statistical analysis. This exploration has detailed how Python, through libraries like SciPy and Statsmodels, facilitates robust calculation of confidence intervals. Key concepts including the t-distribution, normal distribution, margin of error, confidence level, and the impact of sample size have been thoroughly examined. Correct application of these principles enables quantification of uncertainty associated with estimations, leading to more nuanced data interpretation.

Confidence interval analysis empowers informed decision-making across diverse fields. From scientific research to business analytics, understanding and appropriately applying these techniques strengthens statistical inferences drawn from data. Continued exploration of advanced statistical methods and best practices within Python’s evolving ecosystem will further enhance the power and applicability of confidence interval analysis, fostering rigorous and impactful data-driven insights.