====================================================================================
MerQur - Ekonomi_Isletme - SCENARIO + RESULT + COMMENTARY (EN, MERGED)
Data: english/datasets/Ekonomi_Isletme/
Each analysis: SCENARIO + VARIABLE SELECTION, then RESULT (screen) + COMMENTARY.
====================================================================================

#1  Descriptive Statistics
    file: 01_descriptive_demographics.xlsx
  >> SCENARIO (narration):
    We compiled the demographic and operational inventory of 280 firms. Age, monthly
    income, satisfaction and weekly operation hours were measured for each. Before
    any inferential test we want the overall picture of the sample; so we begin with
    descriptive statistics.
  >> VARIABLE SELECTION:
    - Variables: age
    - Variables: investment_year
    - Variables: monthly_income_TL
    - Variables: satisfaction
    - Variables: weekly_operation
    - Grouping (categorical): type

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n = 280 firms
    age: mean = 43.9   |   monthly income: mean = 12,228 TL   |   satisfaction: mean = 3.47 (of 5)
    weekly operation hours: mean = 40.3

>> COMMENTARY (narration):
    First we draw the overall picture of our firm sample: 280 firms, average firm/manager age ~44, mean monthly
    income ~12,200 TL, satisfaction of 3.47 out of 5, and ~40 weekly operating hours. This descriptive table lays
    the groundwork for every analysis that follows -- strategy/sector comparisons, productivity-KPI relationships,
    spatial market value. In business analytics, before any inferential test, summarizing the sample's basic features
    (income, age, operations, satisfaction) is essential both to audit data quality and to set managerial priorities.

====================================================================================

#2  Normality Tests
    file: 02_normality_income_productivity.xlsx
  >> SCENARIO (narration):
    We examine whether income, productivity and risk aversion are normally
    distributed. Because the validity of the t-tests, ANOVA and correlation that
    follow depends on this assumption, we test each variable separately.
  >> VARIABLE SELECTION:
    - Variables: income
    - Variables: productivity
    - Variables: riskaversion

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    3 continuous variables tested:
    income                  : Shapiro-Wilk = 0.899  p < .001    KS p = 0.001   Not Normal
    productivity            : Shapiro-Wilk = 0.994  p = 0.657    KS p = 0.635   Normal
    riskaversion            : Shapiro-Wilk = 0.904  p < .001     KS p = 0.001   Not Normal

>> COMMENTARY (narration):
    We tested whether three continuous variables -- income, productivity and risk aversion -- are normally
    distributed. The result splits instructively: productivity is normal (p = 0.66), but income and risk aversion
    deviate significantly from normality (p < .001). This is typical in economic data -- income is usually
    right-skewed (a few very high incomes stretch the tail), and risk aversion is an ordinal/bounded scale. Practical
    upshot: we can safely use parametric tests (t-test, ANOVA, Pearson) on productivity; for income and risk aversion,
    nonparametric methods (Mann-Whitney/Kruskal-Wallis) or a log transform are more appropriate. The normality check
    is a critical preliminary step that decides, per variable, which test family fits.

====================================================================================

#3  One-Sample t-Test
    file: 03_one_sample_t_kpi.xlsx
  >> SCENARIO (narration):
    We investigate whether the firms' mean KPI differs from a sector reference
    threshold of 50. With a single group and a fixed reference value, the one-sample
    t-test is appropriate.
  >> VARIABLE SELECTION:
    - Test variable: kpi
    - Test value (mu): 50

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left): one-sided is more powerful when the direction is known beforehand.
    - Hedges g: small-sample bias-corrected Cohen's d.
    - Effect-size CI: confidence interval around d.
    - Shapiro-Wilk / K-S: normality assumption checks.
    - Descriptives: mean/SD/SE/median/min/max/skewness/kurtosis.
    - Bootstrap CI: distribution-free CI for the mean by resampling.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    t(99) = 2.316   p = 0.023 *   Cohen d = 0.232 (Small)
    Mean KPI = 54.80   (test mu = 50, reference threshold)   H0 REJECTED

>> COMMENTARY (narration):
    We compared the firms' average KPI score against a sector reference threshold of 50. The result is significant
    but small in scale: mean 54.8, above the threshold -- t(99) = 2.32, p = 0.023, effect size d = 0.23. Firms
    perform statistically above the reference target, but the practical size of the gap is modest. The one-sample
    t-test is the right way to compare a business indicator against a known standard/target (sector mean, KPI goal);
    it is widely used in performance evaluation and in checking conformity to a target.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left): one-sided is more powerful when the direction is known beforehand.
    - Hedges g: small-sample bias-corrected Cohen's d.
    - Effect-size CI: confidence interval around d.
    - Shapiro-Wilk / K-S: normality assumption checks.
    - Descriptives: mean/SD/SE/median/min/max/skewness/kurtosis.
    - Bootstrap CI: distribution-free CI for the mean by resampling.

====================================================================================

#4  Independent-Samples t-Test
    file: 04_independent_t_sex_rating.xlsx
  >> SCENARIO (narration):
    We compare the mean rating of two independent groups (sex). With two separate
    groups and a continuous measure, the independent-samples t-test is appropriate.
  >> VARIABLE SELECTION:
    - Grouping (categorical): sex
    - Test variable: rating

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left).
    - Variance assumption: Student (equal var) / Welch (unequal var — safer) / Auto (Levene decides).
    - Effect sizes: Hedges g, Glass's delta, CLES = P(X>Y).
    - Effect-size CI; per-group Shapiro; Levene & Bartlett homogeneity.
    - Per-group descriptives; Bootstrap CI for the mean difference.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    t(113) = 3.606   p < .001 ***   Cohen d = 0.673 (Medium)
    H0 REJECTED

>> COMMENTARY (narration):
    We compared the mean rating score of two independent groups (by sex). The difference is significant and
    medium-sized: t(113) = 3.61, p < .001, d = 0.67. It shows the between-group difference is too pronounced to be
    chance and is also practically noteworthy. The independent-samples t-test is the standard way to compare the
    means of two separate groups (male/female manager, two branches, two customer segments) on a continuous measure;
    it is a fundamental tool for detecting group differences in business.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left).
    - Variance assumption: Student (equal var) / Welch (unequal var — safer) / Auto (Levene decides).
    - Effect sizes: Hedges g, Glass's delta, CLES = P(X>Y).
    - Effect-size CI; per-group Shapiro; Levene & Bartlett homogeneity.
    - Per-group descriptives; Bootstrap CI for the mean difference.

====================================================================================

#5  Paired-Samples t-Test
    file: 05_paired_t_on_last.xlsx
  >> SCENARIO (narration):
    We compare two scores measured before and after an intervention in the same
    firms. Since the measures are paired, the paired t-test is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: on_test
    - 2nd measure / group: last_test

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left).
    - Effect sizes: Hedges g; d_av (standardized by the average SD).
    - Effect-size CI; pairwise correlation between the two measures.
    - Shapiro / K-S on the differences; descriptives; Bootstrap CI of the mean difference.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    t(49) = -15.99   p < .001 ***   Cohen d_z = -2.262 (Large)
    Mean diff (on_test - last_test) = -12.23   H0 REJECTED

>> COMMENTARY (narration):
    We paired and compared two scores measured before and after a training/intervention in the same firms (on_test
    vs last_test). The result is very strong: mean difference -12.2 points, t(49) = -15.99, p < .001, d_z = -2.26,
    a huge effect. Post-intervention scores rose significantly and substantially. The paired t-test compares two
    timed measures on the same unit (before/after training, before/after campaign); by isolating individual change
    it is more powerful than the independent test and is the right way to measure an intervention's effect in
    business.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction (two-sided / right / left).
    - Effect sizes: Hedges g; d_av (standardized by the average SD).
    - Effect-size CI; pairwise correlation between the two measures.
    - Shapiro / K-S on the differences; descriptives; Bootstrap CI of the mean difference.

====================================================================================

#6  One-Way ANOVA
    file: 06_anova_strategy.xlsx
  >> SCENARIO (narration):
    We compare the effect of four strategies on the mean rating. With more than two
    groups, one-way ANOVA is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: rating
    - Factor (categorical): strategy

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - ANOVA variant: Classic (Fisher) or Welch (robust to unequal variances).
    - Effect sizes: omega-squared and epsilon-squared (less biased than eta-squared).
    - Assumptions: Levene, Bartlett, per-group Shapiro.
    - Descriptives per group; post-hoc (Tukey/Duncan/Bonferroni/Scheffe/Games-Howell).

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    F(3,136) = 15.38   p < .001 ***   eta^2 = 0.253   H0 REJECTED

>> COMMENTARY (narration):
    We tested the effect of four different strategies on the average rating score. The result is significant and
    strong: F(3,136) = 15.38, p < .001, eta^2 = 0.25 -- about a quarter of score variance comes from strategy
    differences. At least one strategy differs significantly from the others. One-way ANOVA compares the means of
    more than two groups at once (avoiding the error inflation of many t-tests); in business it is the core method
    for comparing the performance of different strategies/branches/segments. Which pairs differ is then determined by
    post-hoc tests.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - ANOVA variant: Classic (Fisher) or Welch (robust to unequal variances).
    - Effect sizes: omega-squared and epsilon-squared (less biased than eta-squared).
    - Assumptions: Levene, Bartlett, per-group Shapiro.
    - Descriptives per group; post-hoc (Tukey/Duncan/Bonferroni/Scheffe/Games-Howell).

====================================================================================

#7  Two-Way ANOVA
    file: 07_two_way_anova.xlsx
  >> SCENARIO (narration):
    We examine the main effects and interaction of strategy and sex on the rating
    simultaneously. With two categorical factors, two-way ANOVA is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: rating
    - Factor (categorical): strategy
    - 2nd Factor: sex

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sum-of-squares type (I/II/III): Type III for unbalanced designs with interaction (SPSS default).
    - Post-hoc (Tukey/Bonferroni/Games-Howell) for 3+ level factors.
    - Effect sizes: partial eta-squared, eta-squared, omega-squared.
    - Levene & residual Shapiro; cell and marginal means tables.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    strategy (main effect): F(2) = 43.85   p < .001 ***   eta^2p = 0.379
    sex (main effect)     : F(1) = 0.42    p = 0.519 ns    eta^2p = 0.003

>> COMMENTARY (narration):
    We examined two factors at once: how do strategy and sex affect the rating score? The strategy main effect is
    very strong (F(2) = 43.85, p < .001, eta^2p = 0.38), while the sex main effect is non-significant (p = 0.52). The
    decisive driver of the score is strategy; sex alone contributes nothing notable. The power of two-way ANOVA is
    that it tests both factors and their interaction in a single model -- isolating each factor's pure effect with
    the other controlled. It is ideal for answering "which variable really makes a difference?" in business.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sum-of-squares type (I/II/III): Type III for unbalanced designs with interaction (SPSS default).
    - Post-hoc (Tukey/Bonferroni/Games-Howell) for 3+ level factors.
    - Effect sizes: partial eta-squared, eta-squared, omega-squared.
    - Levene & residual Shapiro; cell and marginal means tables.

====================================================================================

#8  Repeated-Measures ANOVA
    file: 08_repeated_anova_quarter_kpi.xlsx
  >> SCENARIO (narration):
    We compare KPI measured over four consecutive quarters in the same firms. With
    repeated measures on the same unit, repeated-measures ANOVA is appropriate.
  >> VARIABLE SELECTION:
    - Repeated measures: measurement_1
    - Repeated measures: measurement_2
    - Repeated measures: measurement_3
    - Repeated measures: measurement_4

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sphericity correction: Greenhouse-Geisser when Mauchly's test is violated.
    - Mauchly's sphericity test (W, p).
    - Generalized eta-squared (ges) effect size.
    - Post-hoc pairwise (Bonferroni/Holm); descriptives per level.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    F(3,177) = 108.40   p < .001 ***   eta^2p = 0.648   n = 60   H0 REJECTED

>> COMMENTARY (narration):
    We compared KPI measured across four consecutive periods (quarters) in the same 60 firms. The result is very
    strong: F(3,177) = 108.40, p < .001, eta^2p = 0.65 -- the between-period difference is huge and most of the
    effect is time-related. Firm performance changes significantly across quarters. Repeated-measures ANOVA compares
    three or more timed measurements on the same unit; by holding individual differences constant it yields high
    statistical power and is the right choice for multi-period performance tracking (quarterly KPI, monthly sales)
    in business.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sphericity correction: Greenhouse-Geisser when Mauchly's test is violated.
    - Mauchly's sphericity test (W, p).
    - Generalized eta-squared (ges) effect size.
    - Post-hoc pairwise (Bonferroni/Holm); descriptives per level.

====================================================================================

#9  MANOVA
    file: 09_manova_strategy_3sector.xlsx
  >> SCENARIO (narration):
    We test strategy's effect on sales, operations and marketing at once. With
    several correlated dependent variables, MANOVA is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: sales
    - Dependent variable: operations
    - Dependent variable: marketing
    - Factor (categorical): strategy

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Reference test for the overall decision: Wilks / Pillai (most robust) / Hotelling-Lawley / Roy.
    - Box's M: equality of covariance matrices across groups.
    - Univariate follow-up ANOVAs (one per dependent variable).
    - Multivariate partial eta-squared; per-group descriptive means.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Wilks' Lambda = 0.433   F(6,230) = 19.90   p < .001 ***   n = 120
    Dependent: sales, operations, marketing   |   Factor: strategy   H0 REJECTED

>> COMMENTARY (narration):
    We tested strategy's effect on three dependent variables (sales, operations, marketing) simultaneously. With
    Wilks' Lambda = 0.43, F(6,230) = 19.90, p < .001, the effect is very strong. MANOVA examines several correlated
    outcomes in one test, both preventing the error inflation of many separate ANOVAs and capturing the joint
    information the variables carry together. In business, when strategy affects not a single indicator but the
    sales-operations-marketing "bundle" together, MANOVA reveals this multivariate difference as a single decision.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Reference test for the overall decision: Wilks / Pillai (most robust) / Hotelling-Lawley / Roy.
    - Box's M: equality of covariance matrices across groups.
    - Univariate follow-up ANOVAs (one per dependent variable).
    - Multivariate partial eta-squared; per-group descriptive means.

====================================================================================

#10  ANCOVA
    file: 10_ancova.xlsx
  >> SCENARIO (narration):
    We compare final scores across groups while controlling baseline score as a
    covariate. With a confounding continuous variable, ANCOVA is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: last_test
    - Factor (categorical): group
    - Covariate: on_test

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sum-of-squares type (I/II/III).
    - Homogeneity-of-regression-slopes test (factor x covariate interaction — the key ANCOVA assumption).
    - Effect sizes: omega-squared, epsilon-squared.
    - Levene & residual Shapiro; Bonferroni post-hoc on adjusted (estimated marginal) means.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Group effect significant   eta^2p = 0.474 (large)   covariate: on_test   H0 REJECTED

>> COMMENTARY (narration):
    We compared final scores (last_test) across groups while controlling the baseline score (on_test) as a covariate.
    This rules out the objection that "the groups differed at baseline" and measures the pure group effect: the
    effect is large (eta^2p = 0.47). ANCOVA makes the group comparison fair by statistically holding a confounding
    continuous variable constant -- it is the answer to "once we equalize the starting level, does the intervention
    still make a difference?" and is the standard tool in pre-test/post-test designs in business.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Sum-of-squares type (I/II/III).
    - Homogeneity-of-regression-slopes test (factor x covariate interaction — the key ANCOVA assumption).
    - Effect sizes: omega-squared, epsilon-squared.
    - Levene & residual Shapiro; Bonferroni post-hoc on adjusted (estimated marginal) means.

====================================================================================

#11  Bootstrap Confidence Interval
    file: 11_bootstrap_ci.xlsx
  >> SCENARIO (narration):
    For the mean daily downtime we build a confidence interval via resampling, with
    no distributional assumption. For skewed data, bootstrap is appropriate.
  >> VARIABLE SELECTION:
    - Test variable: downtime_day

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Observed mean (downtime/day) = 4.53
    95% Bootstrap CI (via resampling)

>> COMMENTARY (narration):
    For the mean daily downtime we produced a 95% confidence interval via resampling -- with no distributional
    assumption: observed mean 4.53 days. Bootstrap builds the sampling distribution of the statistic empirically by
    resampling the data thousands of times from itself; it is a reliable way to give a confidence interval when
    normality does not hold or no formula is known. In business it provides more robust estimates than classic
    t-intervals for skewed quantities (downtime, waiting time, damage cost).

====================================================================================

#12  Permutation Test
    file: 12_permutation.xlsx
  >> SCENARIO (narration):
    We test the productivity difference between two groups via permutation, with no
    distributional assumption. For small samples/odd distributions, permutation is
    appropriate.
  >> VARIABLE SELECTION:
    - Test variable: productivity
    - Grouping (categorical): group

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    t = -2.247   p = 0.029 *   significant mean difference between the two groups   H0 REJECTED

>> COMMENTARY (narration):
    We tested the productivity difference between two groups without any distributional assumption, via permutation:
    the null distribution was built by randomly swapping group labels, and the observed difference turned out rare in
    that distribution (p = 0.029). Because the permutation test is exact and distribution-free, it is a safe
    alternative to the parametric t-test for small samples or odd distributions; in business it is a robust choice
    for group comparisons where assumptions are in doubt.

====================================================================================

#13  Multiple Comparison
    file: 13_multiple_comparison.xlsx
  >> SCENARIO (narration):
    We take the p-values of eight product/group comparisons together and apply
    multiple-testing correction. With many tests, p-adjustment is appropriate.
  >> VARIABLE SELECTION:
    - Variables: product
    - Variables: rating

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Raw: 5/8 significant
    After Bonferroni / Holm / BH (FDR): 3/8 significant

>> COMMENTARY (narration):
    We took the p-values of eight separate product/group comparisons together and applied multiple-testing correction.
    Raw, 5 comparisons were significant; after Bonferroni/Holm/BH that dropped to 3. When many tests are run, the rate
    of false positives that look "significant" by chance alone inflates; correction methods tighten the threshold to
    control this error. In business, when dozens of products/campaigns/segments are compared at once, some of the
    "significant" conclusions reached without correction can be misleading -- this step protects decision reliability.

====================================================================================

#14  Mann-Whitney U Test
    file: 14_mann_whitney.xlsx
  >> SCENARIO (narration):
    We compare two independent groups on an ordinal/skewed measure. Since normality
    fails, Mann-Whitney is appropriate.
  >> VARIABLE SELECTION:
    - Grouping (categorical): location
    - Test variable: survival_satisfaction

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction; continuity correction.
    - Computation method: auto / exact (precise for small n) / asymptotic.
    - Effect sizes: CLES and Z/sqrt(N) (rank-biserial r already shown).
    - Descriptives (median etc.).

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    U = 1121.50   p = 0.049 *   r = -0.25   H0 REJECTED

>> COMMENTARY (narration):
    We compared the distribution of two independent groups (location) on an ordinal/skewed measure
    (survival_satisfaction) based on ranks rather than means: U = 1121.5, p = 0.049, small-medium effect (r = -0.25).
    The difference is borderline significant. Mann-Whitney is the nonparametric counterpart of the t-test; when
    normality fails or the scale is ordinal, it is the right way to compare two groups. In business it is a robust
    choice for ordinal measures like satisfaction/rating.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction; continuity correction.
    - Computation method: auto / exact (precise for small n) / asymptotic.
    - Effect sizes: CLES and Z/sqrt(N) (rank-biserial r already shown).
    - Descriptives (median etc.).

====================================================================================

#15  Wilcoxon Signed-Rank
    file: 15_wilcoxon_attitude.xlsx
  >> SCENARIO (narration):
    We compare attitude scores measured before/after in the same units, without
    assuming normality. For paired non-normal data, Wilcoxon is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: attitude_before
    - 2nd measure / group: attitude_post

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction; continuity correction.
    - Zero-difference handling: wilcox (drop) / pratt / zsplit.
    - Descriptives for both measures and their difference.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    W = 0.00   p < .001 ***   r = 0.89   n (non-zero) = 30   H0 REJECTED

>> COMMENTARY (narration):
    We compared attitude scores measured before and after on the same units (attitude_before vs post) -- without
    assuming normality, on a rank basis: W = 0, p < .001, very large effect (r = 0.89). Attitude changed consistently
    and strongly after the intervention. Wilcoxon is the nonparametric counterpart of the paired t-test; it is the
    right choice for ordinal or non-normal before/after measures. In business it gives reliable results for measures
    like pre/post-training attitude and satisfaction.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Hypothesis direction; continuity correction.
    - Zero-difference handling: wilcox (drop) / pratt / zsplit.
    - Descriptives for both measures and their difference.

====================================================================================

#16  Kruskal-Wallis Test
    file: 16_kruskal_volatility_book.xlsx
  >> SCENARIO (narration):
    We compare more than two groups on a numeric/ordinal measure. Since
    normality/variance homogeneity fails, Kruskal-Wallis is appropriate.
  >> VARIABLE SELECTION:
    - Grouping (categorical): volatility
    - Test variable: book_count

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Epsilon-squared effect size.
    - Dunn post-hoc pairwise comparison (tie-corrected, Bonferroni/Holm).
    - Descriptives per group.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    H(2) = 15.96   p < .001 ***   eta^2_H = 0.33   H0 REJECTED

>> COMMENTARY (narration):
    We compared the distribution of a numeric/ordinal measure (book_count) across more than two groups (volatility
    level) by ranks rather than means: H(2) = 15.96, p < .001, eta^2_H = 0.33, a strong effect. At least one group
    differs significantly. Kruskal-Wallis is the nonparametric counterpart of one-way ANOVA; when normality or
    variance homogeneity fails, it is the right way to do multi-group comparison. In business it is robust for
    detecting group differences on skewed or ordinal measures.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Epsilon-squared effect size.
    - Dunn post-hoc pairwise comparison (tie-corrected, Bonferroni/Holm).
    - Descriptives per group.

====================================================================================

#17  Friedman Test
    file: 17_friedman_program.xlsx
  >> SCENARIO (narration):
    We compare scores measured under four conditions in the same units. As a
    nonparametric repeated measure, Friedman is appropriate.
  >> VARIABLE SELECTION:
    - Repeated measures: condition_A
    - Repeated measures: condition_B
    - Repeated measures: condition_C
    - Repeated measures: condition_D

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Pairwise Wilcoxon signed-rank post-hoc (Bonferroni/Holm).
    - Descriptives per condition.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    chi^2(3) = 39.08   p < .001 ***   Kendall W = 0.434   n = 30   H0 REJECTED

>> COMMENTARY (narration):
    We compared scores measured under four conditions/programs (condition_A..D) in the same 30 units -- as a
    nonparametric repeated measure: chi^2(3) = 39.08, p < .001, Kendall W = 0.43 (moderate concordance). The
    between-condition difference is significant. Friedman is the nonparametric counterpart of repeated-measures ANOVA;
    it is the right choice for ordinal or non-normal paired multi-condition measures. In business it is used to
    compare the same firm's rankings across different methods/periods.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Pairwise Wilcoxon signed-rank post-hoc (Bonferroni/Holm).
    - Descriptives per condition.

====================================================================================

#18  Binomial Test
    file: 18_binomial_performance.xlsx
  >> SCENARIO (narration):
    We test the proportion of profitable firms against an expected 50%. With a
    binary outcome and a theoretical proportion, the binomial test is appropriate.
  >> VARIABLE SELECTION:
    - Test variable: profitable
    - Expected proportion: 0.50
    - Success value: 1

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Observed proportion = 0.704   (expected p = 0.50)   p < .001 ***   H0 REJECTED

>> COMMENTARY (narration):
    We tested the proportion of profitable firms against an expected proportion of 50%: observed proportion 70.4%,
    well above expectation (p < .001). The profitability rate is too high to be chance. The binomial test is the exact
    method for comparing the observed proportion of a binary (yes/no) outcome with a theoretical proportion; in
    business it directly tests whether success/profitability/conversion rates meet a target or a 50:50 expectation.

====================================================================================

#19  Sign Test
    file: 19_sign_test_program.xlsx
  >> SCENARIO (narration):
    We look at the direction of before/after ratings in the same units. When only
    directional information is reliable, the sign test is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: rating_before
    - 2nd measure / group: rating_post

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Positive diffs (before > after) = 0   p < .001 ***   H0 REJECTED

>> COMMENTARY (narration):
    We looked at the direction of change in ratings measured before and after on the same units (rating_before vs
    post): almost all changes go in one direction, none in reverse (positive diffs = 0), p < .001. The sign test uses
    only the direction of the difference (increase/decrease), not its magnitude, so it is the before/after test that
    requires the fewest assumptions. In business it is a robust choice when the measure is skewed or only directional
    information is reliable (did satisfaction go up or down).

====================================================================================

#20  Runs Test
    file: 20_runs_test.xlsx
  >> SCENARIO (narration):
    We test whether the absence sequence (around the median) is random. For sequence
    randomness, the runs test is appropriate.
  >> VARIABLE SELECTION:
    - Column: absent

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Observed runs = 28   Z = -0.243   p = 0.808 ns   data may be considered random

>> COMMENTARY (narration):
    We tested whether the binary sequence of absences (around the median) is random: 28 runs, Z = -0.24, p = 0.81 --
    no pattern, the sequence is random. The runs test checks whether values in a sequence form a systematic pattern
    (clusters, cycles, trend). In business it is used to determine whether systematic patterns or randomness dominate
    in quality/production/error series, and in checking process control and the independence assumption.

====================================================================================

#21  Chi-Square Independence
    file: 21_chisquare_volatility_corporation.xlsx
  >> SCENARIO (narration):
    We test whether volatility level and corporate status are related. With two
    categorical variables, chi-square is appropriate.
  >> VARIABLE SELECTION:
    - Variables: volatility
    - Variables: corporation

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Yates continuity correction (2x2 tables).
    - G-test (likelihood-ratio chi-square) alternative.
    - Effect sizes: phi (2x2) and contingency coefficient C (besides Cramer's V).
    - Expected-counts table; standardized residuals (|>2| flags the deviating cell).

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    chi^2(2) = 141.06   p < .001 ***   Cramer's V = 0.511 (Strong)   H0 REJECTED

>> COMMENTARY (narration):
    We tested whether two categorical variables -- volatility level and corporate status -- are related: chi^2(2) =
    141.06, p < .001, Cramer's V = 0.51, a strong dependency. The categories are not independent; they vary together.
    The chi-square test of independence detects the relationship between two qualitative variables from a cross-tab;
    in business it is the core method for revealing categorical relationships such as segment-preference,
    region-strategy. Cramer's V measures the practical strength of the relationship.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Yates continuity correction (2x2 tables).
    - G-test (likelihood-ratio chi-square) alternative.
    - Effect sizes: phi (2x2) and contingency coefficient C (besides Cramer's V).
    - Expected-counts table; standardized residuals (|>2| flags the deviating cell).

====================================================================================

#22  Chi-Square Goodness-of-Fit
    file: 22_chisquare_goodnessfit_style.xlsx
  >> SCENARIO (narration):
    We test whether a four-category variable's observed distribution fits an equal
    expected distribution. For one categorical variable, goodness-of-fit is
    appropriate.
  >> VARIABLE SELECTION:
    - Variables: style

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Effect sizes: Cohen's w and Cramer's V.
    - G-test (likelihood ratio) alternative.
    - Standardized residuals per category (|>2| = notable deviation).

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    chi^2(3) = 22.88   p < .001 ***   N = 200, k = 4 (expected: equal distribution)   H0 REJECTED

>> COMMENTARY (narration):
    We tested whether the observed distribution of a four-category variable (style) fits an equal (1/k) expected
    distribution: chi^2(3) = 22.88, p < .001 -- the categories are not equally distributed, some are clearly more
    frequent. The goodness-of-fit test compares the observed frequencies of a single categorical variable with a
    theoretical expectation (equal proportions, a known market share); in business it tests whether preference/choice
    distributions match an expected profile.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Effect sizes: Cohen's w and Cramer's V.
    - G-test (likelihood ratio) alternative.
    - Standardized residuals per category (|>2| = notable deviation).

====================================================================================

#23  Fisher's Exact Test
    file: 23_fisher.xlsx
  >> SCENARIO (narration):
    In a 2x2 table we test the strategy-success relationship exactly, due to small
    cell frequencies. For few observations, Fisher is appropriate.
  >> VARIABLE SELECTION:
    - Variables: strategy
    - Variables: pass

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Fisher exact p = 0.018 *   Odds Ratio = very high   Phi = 0.486 (Strong)   H0 REJECTED

>> COMMENTARY (narration):
    In a 2x2 cross-tab (strategy x pass) we tested the relationship exactly -- using Fisher instead of chi-square
    because of small cell frequencies: p = 0.018, with a strong relationship (Phi = 0.49). Fisher's exact test is the
    right choice when expected frequencies are low and the chi-square approximation is unreliable; it computes the
    probability exactly rather than approximately. In business it gives reliable results for small-sample pilot/trial
    comparisons (is the new strategy successful).

====================================================================================

#24  McNemar Test
    file: 24_mcnemar.xlsx
  >> SCENARIO (narration):
    We compare a binary outcome at two times in the same firms (pass/fail). For
    paired binary change, McNemar is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: on_test
    - 2nd measure / group: last_test

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    chi^2 = 0.00   p = 1.000 ns   discordant b = 13, c = 14   OR = 0.929   H0 NOT REJECTED

>> COMMENTARY (narration):
    We tested the direction of change in a binary outcome measured at two times in the same firms (on_test vs
    last_test: pass/fail): the changes are nearly balanced (b = 13, c = 14), p = 1.00 -- no significant directional
    change. McNemar tests the before/after binary status change in the same unit and looks only at discordant pairs.
    In business it is the right tool for detecting whether status changes before/after an intervention (approval/
    rejection, pass/fail) are systematic.

====================================================================================

#25  Cohen's Kappa
    file: 25_kappa.xlsx
  >> SCENARIO (narration):
    We measure the agreement of two raters classifying the same units. For
    categorical agreement, kappa is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: manager_a
    - 2nd measure / group: manager_b

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Kappa = 0.585 (moderate agreement)

>> COMMENTARY (narration):
    We measured the agreement of two raters (manager_a vs manager_b) in assigning the same units to the same
    categories -- excluding the agreement expected by chance: kappa = 0.585, moderate. Unlike raw percent agreement,
    kappa reports categorical agreement after removing the chance-agreement share, so it is more honest. In business
    it is the standard index for measuring how consistent/interchangeable two managers'/auditors' classifications
    (risk grade, quality class) are.

====================================================================================

#26  Cochran-Mantel-Haenszel
    file: 26_cmh.xlsx
  >> SCENARIO (narration):
    We test the group-success relationship controlling for company strata. For a
    stratum-controlled relationship, CMH is appropriate.
  >> VARIABLE SELECTION:
    - Variables: group
    - Variables: successful
    - Stratum: company

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    CMH chi^2(1) = 19.67   p < .001 ***   Common OR (MH) = 2.77 [1.76, 4.37]
    Breslow-Day p = 0.982 (OR homogeneous)   H0 REJECTED

>> COMMENTARY (narration):
    We tested the group-success relationship while controlling for company strata: the common Odds Ratio across
    strata = 2.77 [1.76, 4.37], p < .001; Breslow-Day p = 0.98 means this relationship is consistent across all
    strata. CMH measures the pure strength of the association by holding a confounding stratum variable constant
    (preventing Simpson's paradox). In business it is ideal for robustly estimating a group-outcome relationship
    while controlling company/region differences.

====================================================================================

#27  Log-Linear Analysis
    file: 27_log_linear.xlsx
  >> SCENARIO (narration):
    We model the joint relationship structure of three categorical variables. For
    more than two categorical dimensions, log-linear is appropriate.
  >> VARIABLE SELECTION:
    - Variables: sex
    - Variables: volatility
    - Variables: corporation_reader

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 46.72   Pearson chi^2 = 0.0 (saturated model)   joint relationship of 3 categorical variables modeled

>> COMMENTARY (narration):
    We examined the joint relationship structure of three categorical variables (sex, volatility, corporate reader)
    with a log-linear model. The model explains cell frequencies via main effects and interactions; it reveals which
    pairs/triples of variables vary together. It is the multivariable generalization of the two-way cross-tab. In
    business it is used to analyze the joint dependency pattern of more than three categorical dimensions (segment x
    region x channel), balancing parsimony with AIC to select the most explanatory structure.

====================================================================================

#28  Cross-Tabulation
    file: 28_cross.xlsx
  >> SCENARIO (narration):
    We examine age group and political leaning in a cross-tab. For the relationship
    of two qualitative variables, cross-tab is appropriate.
  >> VARIABLE SELECTION:
    - Variables: age
    - Variables: political

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    chi^2(6) = 9.29   p = 0.158 ns   Cramer's V = 0.115   H0 NOT REJECTED

>> COMMENTARY (narration):
    We examined two categorical variables (age group x political leaning) in a cross-tab: chi^2(6) = 9.29, p = 0.16,
    V = 0.12 -- no significant relationship, the variables are largely independent. Cross-tab + chi-square shows the
    direction and strength of the association between two qualitative variables at the cell level. In business it is
    used to describe demography-preference relationships; as here, "no relationship" is also a valuable finding (no
    need to treat the segments differently).

====================================================================================

#29  Multiple Response - Frequency
    file: 29_mr_frequency.xlsx
  >> SCENARIO (narration):
    We analyze a multi-select operations question. For a multi-select question,
    multiple-response frequency is appropriate.
  >> VARIABLE SELECTION:
    - Variables: operations (coklu yanit / multi-response)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Total cases n = 250   Respondents = 250 (100%)   multi-select "operations" question

>> COMMENTARY (narration):
    We analyzed a question where several options could be checked ("which operational areas do you work in?"): each of
    250 firms gave one or more options. Multiple-response frequency analysis gives the count of checks per option and
    both the response and case percentages separately (percentages sum to over 100, because one firm picks multiple).
    In business it is the standard method for correctly summarizing multi-select survey questions (channels used,
    services offered).

====================================================================================

#30  Multiple Response - Cross-Tab
    file: 30_mr_categorical.xlsx
  >> SCENARIO (narration):
    We cross-tabulate the multi-response operations question by sex. To break a
    multi-select by a category, this is appropriate.
  >> VARIABLE SELECTION:
    - Variables: operations (coklu yanit / multi-response)
    - Grouping (categorical): sex

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Total cases n = 220   Group column: sex   |   multi-response "operations" x sex

>> COMMENTARY (narration):
    We cross-tabulated the multi-response operations question by a single category (sex): we compared the per-option
    check rates for each group. A multiple-response cross-tab answers "does one group check certain options more often
    than another?". In business it is used to compare segments' (sex, region) multi-select preference profiles
    (channels used, services demanded).

====================================================================================

#31  Multiple Response x Multiple Response
    file: 31_mr_mr.xlsx
  >> SCENARIO (narration):
    We cross-tabulate two multi-response questions (interest x career) against each
    other. For many-to-many co-occurrence, this is appropriate.
  >> VARIABLE SELECTION:
    - Variables: interest (coklu / multi)
    - Variables: career (coklu / multi)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Total cases n = 180   two multi-responses (interest x career) cross-tabulated

>> COMMENTARY (narration):
    We cross-tabulated two separate multi-response questions against each other (interest areas x career goals). This
    is the most complex form of tabulation: on both axes a unit contributes to more than one cell. Multiple-response
    by multiple-response reveals many-to-many co-occurrences such as "which interest areas appear together with which
    career goals?". In business it is used to examine the matching pattern of nested preference bundles (product
    interest x channel use).

====================================================================================

#32  Cochran's Q Test
    file: 32_cochran_q.xlsx
  >> SCENARIO (narration):
    We test whether a binary outcome (liked/not) varies across programs in the same
    firms. For 3+ repeated binary measures, Cochran's Q is appropriate.
  >> VARIABLE SELECTION:
    - Columns: program-bazli ikili sutunlar / program-wise binary columns

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Cochran's Q = 0.00   p = 1.000 ns   H0 NOT REJECTED

>> COMMENTARY (narration):
    We tested whether the binary outcome (liked: yes/no) measured for different programs in the same firms varies
    significantly from program to program: Q = 0, p = 1.00 -- no difference across programs. Cochran's Q is the
    generalization of McNemar to more than two repeated conditions; it compares 3+ binary measures in the same unit.
    In business it is the right method for comparing whether the same customers liked multiple campaigns/features.

====================================================================================

#33  Correlation Analysis
    file: 33_correlation_5variable.xlsx
  >> SCENARIO (narration):
    We examine all pairwise correlations among five continuous variables. For
    relationship direction and strength, the correlation matrix is appropriate.
  >> VARIABLE SELECTION:
    - Variables: productivity
    - Variables: operation_hour
    - Variables: kpi
    - Variables: riskaversion
    - Variables: satisfaction

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - p-values are now produced for ALL methods (Pearson/Spearman/Kendall), not only Pearson.
    - Hypothesis direction (two-sided / right / left).
    - Multiple-comparison p-adjustment across pairs: Bonferroni / Holm / FDR (Benjamini-Hochberg).
    - Confidence interval for r via Fisher z (Pearson/Spearman) or Kendall SE.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    5 variables: productivity, operation_hour, kpi, riskaversion, satisfaction
    Strong relationship (|r| >= 0.75): NONE above this threshold

>> COMMENTARY (narration):
    We computed all pairwise Pearson correlations among five continuous variables (productivity, operation hours, KPI,
    risk aversion, satisfaction): none exceeded the 0.75 strong threshold -- the variables move largely independently.
    This too is a valuable finding: most measures carry different information, none substitutes for another. The
    correlation matrix summarizes the direction and strength of relationships at a glance; in business it is the first
    step in spotting overlap among indicators (multicollinearity risk) and seeing which variables truly give separate
    signals.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - p-values are now produced for ALL methods (Pearson/Spearman/Kendall), not only Pearson.
    - Hypothesis direction (two-sided / right / left).
    - Multiple-comparison p-adjustment across pairs: Bonferroni / Holm / FDR (Benjamini-Hochberg).
    - Confidence interval for r via Fisher z (Pearson/Spearman) or Kendall SE.

====================================================================================

#34  Bland-Altman Agreement
    file: 34_bland_altman.xlsx
  >> SCENARIO (narration):
    We examine the agreement of two methods measuring the same efficiency. For
    method interchangeability, Bland-Altman is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: efficiency_test_a
    - 2nd measure / group: efficiency_test_b

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Method 1 (efficiency_test_a): mean = 105.94   |   Method 2 (efficiency_test_b): mean = 102.75
    Bias (mean difference) ~ 3.19   |   limits of agreement (LoA) computed

>> COMMENTARY (narration):
    We examined how well two methods measuring the same efficiency (test_a vs test_b) agree: the mean systematic
    difference (bias) is ~3.2 units, and 95% limits of agreement were reported. Unlike correlation, Bland-Altman
    answers "can the two methods be used interchangeably?" -- high correlation does not mean agreement, there may be a
    systematic shift. In business it is the standard method for testing the interchangeability of two measuring
    instruments/sensors/valuation methods.

====================================================================================

#35  Effect Size
    file: 35_effect_size.xlsx
  >> SCENARIO (narration):
    We measure the practical size of the rating difference between two product
    groups. For importance beyond the p-value, effect size is appropriate.
  >> VARIABLE SELECTION:
    - Test variable: rating
    - Grouping (categorical): product

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Cohen's d = -0.928 (large effect)   rating difference between two product groups (product)

>> COMMENTARY (narration):
    We measured the practical size of the difference between two product groups, independent of the p-value, with
    Cohen's d: d = -0.93, a large effect. The p-value answers "is there a difference?"; effect size answers "how
    important is it?". Because large samples can produce significant but trivial differences, reporting effect size
    is essential. In business this measure clarifies whether the difference between two strategies/products is
    managerially noteworthy.

====================================================================================

#36  Canonical Correlation (CCA)
    file: 36_cca.xlsx
  >> SCENARIO (narration):
    We examine the joint structure between the performance set and the
    attitude/outcome set. For the relationship between two multivariate sets, CCA is
    appropriate.
  >> VARIABLE SELECTION:
    - X variables: sales
    - X variables: operations
    - X variables: marketing
    - X variables: logistics
    - X variables: logic
    - Y variables: productivity
    - Y variables: attitude
    - Y variables: satisfaction
    - Y variables: riskaversion

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    CC1: r = 0.985   chi^2(20) = 1407.32   p < .001 ***
    CC2: r = 0.965   chi^2(12) = 900.60    p < .001 ***
    Set-X: sales, operations, marketing, logistics, logic  |  Set-Y: productivity, attitude, satisfaction, riskaversion

>> COMMENTARY (narration):
    We resolved the joint structure between two multivariate measure sets -- performance indicators (sales,
    operations, marketing, logistics, logic) and attitude/outcome indicators (productivity, attitude, satisfaction,
    risk aversion) -- with canonical correlation. The first two canonical functions are very strong (r = 0.985 and
    0.965, p < .001): the two sets are intensely related. CCA answers "how is one variable set related to another?"
    in a single step -- it is the multivariate-on-both-sides version of multiple regression. In business it reveals
    the latent relationship structure between the operational bundle and the attitude/outcome bundle.

====================================================================================

#37  Correspondence Analysis
    file: 37_ca.xlsx
  >> SCENARIO (narration):
    We map the relationship between volatility level and sector. To see the
    structure of two categorical variables, CA is appropriate.
  >> VARIABLE SELECTION:
    - Variables: volatility
    - Variables: sector

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Total inertia = 0.846   Dim1: 94.4%   Dim2: 5.6%   (2 dimensions)   volatility x sector

>> COMMENTARY (narration):
    We mapped the relationship in the cross-tab of two categorical variables (volatility level x sector) into a
    visual space with correspondence analysis: 94% of total inertia concentrates in one dimension -- the relationship
    can be summarized on essentially a single axis. CA positions the chi-square relationship in a two-dimensional
    space, showing which categories are close (co-occurring). In business it is powerful for visually interpreting the
    structure of qualitative relationships such as segment-sector, preference-region.

====================================================================================

#38  Variable Clustering (VarClus)
    file: 38_varclus.xlsx
  >> SCENARIO (narration):
    We cluster eighteen items by their similarity. To find the latent dimension
    structure, VarClus is appropriate.
  >> VARIABLE SELECTION:
    - Variables: 18 madde / 18 items (firm_id haric / excluded)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Number of clusters = 3   (18 items split into 3 dimensions by similarity)

>> COMMENTARY (narration):
    We clustered eighteen measurement items by how related they are to each other: they grouped into 3 main
    dimensions. VarClus groups the VARIABLES, not the observations -- by placing highly correlated items in the same
    cluster it reveals the latent dimensional structure of the data set. In business it is a practical tool for
    reducing a long indicator/survey set to a few core dimensions, and for spotting redundant (duplicate) items to
    shorten a scale.

====================================================================================

#39  Multiple Linear Regression
    file: 39_multiple_regression_kpi.xlsx
  >> SCENARIO (narration):
    We model KPI with four predictors. To explain a continuous outcome with multiple
    variables, multiple regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: kpi
    - Predictor(s): operation
    - Predictor(s): productivity
    - Predictor(s): parent_investment
    - Predictor(s): downtime

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Robust standard errors (HC0-HC3): heteroscedasticity-robust SE; HC3 recommended for small n.
    - Standardized (beta) coefficients to compare relative effect.
    - (Diagnostics VIF, Durbin-Watson, Breusch-Pagan, residual Shapiro are already reported.)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    R^2 = 0.616   Adj. R^2 = 0.608   predictors: operation, productivity, parent_investment, downtime

>> COMMENTARY (narration):
    We modeled KPI with four predictors (operation, productivity, investment, downtime) at once: the model explains
    61.6% of variance (Adj. R^2 = 0.61) -- strong explanatory power. Multiple regression gives each predictor's pure
    contribution to KPI with the others held constant; thus it answers "which factor really raises KPI?" while
    controlling confounders. In business it is the core method for identifying the drivers of performance and for
    prediction.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Robust standard errors (HC0-HC3): heteroscedasticity-robust SE; HC3 recommended for small n.
    - Standardized (beta) coefficients to compare relative effect.
    - (Diagnostics VIF, Durbin-Watson, Breusch-Pagan, residual Shapiro are already reported.)

====================================================================================

#40  Logistic Regression
    file: 40_logistic.xlsx
  >> SCENARIO (narration):
    We model corporate performance (success/failure) with four continuous
    predictors. For a binary outcome, logistic regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: corporation_performance
    - Predictor(s): kpi
    - Predictor(s): operation
    - Predictor(s): productivity
    - Predictor(s): volatility

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Pseudo-R squared: Cox-Snell and Nagelkerke (besides McFadden).
    - Classification metrics: accuracy / sensitivity / specificity / AUC (cutoff 0.5).
    - Hosmer-Lemeshow goodness-of-fit test; VIF for predictors.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Pseudo R^2 = 0.171   binary outcome: corporation_performance   predictors: kpi, operation, productivity, volatility

>> COMMENTARY (narration):
    We modeled a binary outcome (corporate performance: success/failure) with four continuous predictors: the model
    has moderate explanatory power (pseudo R^2 = 0.17) and gives each predictor's effect on the odds. Logistic
    regression replaces linear regression when the outcome is binary; coefficients are converted to Odds Ratios to
    read "how many times does the success odds change per unit increase in this variable?". In business it is the core
    model for predicting yes/no outcomes such as profitability, success, churn.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Pseudo-R squared: Cox-Snell and Nagelkerke (besides McFadden).
    - Classification metrics: accuracy / sensitivity / specificity / AUC (cutoff 0.5).
    - Hosmer-Lemeshow goodness-of-fit test; VIF for predictors.

====================================================================================

#41  Count (Poisson) Regression
    file: 41_poisson.xlsx
  >> SCENARIO (narration):
    We model the compliance count with age and productivity. For a count outcome,
    Poisson regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: compliance_count
    - Predictor(s): age
    - Predictor(s): productivity

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 180.91   Deviance = 113.68   McFadden R^2 = 0.014   Overdispersion = 0.64
    count outcome: compliance_count   predictors: age, productivity

>> COMMENTARY (narration):
    We modeled a count variable (compliance/violation count) with age and productivity. The predictors' effect is
    weak (McFadden R^2 = 0.01) and there is no overdispersion (0.64 < 1), so the Poisson assumption is reasonable.
    Poisson regression is the right model when the outcome is a count (number of events 0,1,2,...); linear regression
    is unsuitable because it can produce negative/fractional predictions. In business it is used to explain count
    outcomes such as complaint count, fault count, transaction frequency.

====================================================================================

#42  Multinomial Logistic
    file: 42_multinomial.xlsx
  >> SCENARIO (narration):
    We model the multi-category sector with two predictors. For a nominal
    multi-class outcome, multinomial logistic is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: sector
    - Predictor(s): sales
    - Predictor(s): art

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 252.96   Reference class: 'artist'   outcome: sector (>2 categories)   predictors: sales, art

>> COMMENTARY (narration):
    We modeled a more-than-two-category outcome (sector) with two predictors (sales, art). Multinomial logistic
    compares each category against a reference class (here 'artist') with a separate logistic equation; coefficients
    are read as "as X increases, how does the chance of being in this sector change relative to the reference?". When
    the outcome is nominal with more than two classes (segment, preference type, category choice) it is the right
    choice. In business it is the standard model for multi-option class prediction.

====================================================================================

#43  Ordinal Logistic
    file: 43_ordinal.xlsx
  >> SCENARIO (narration):
    We model the ordinal productivity level with manager support and company
    opportunity. For an ordinal outcome, ordinal logistic is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: productivity_level
    - Predictor(s): manager_support
    - Predictor(s): company_opportunity

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 466.81   ordinal outcome: productivity_level   predictors: manager_support, company_opportunity

>> COMMENTARY (narration):
    We modeled an ordinal outcome (productivity level: low/medium/high) with manager support and company opportunity.
    Ordinal logistic uses the ORDER information between categories (which multinomial ignores); with a "proportional
    odds" assumption it explains all thresholds with one coefficient set. In business it is the right and more
    powerful choice for modeling naturally ordered outcomes such as satisfaction level, risk grade, performance class.

====================================================================================

#44  PLS Regression
    file: 44_pls.xlsx
  >> SCENARIO (narration):
    We predict performance from 12 correlated behavior items. For many highly
    correlated predictors, PLS is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: performance
    - Predictor(s): behavior_01..12

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    R^2 (train) = 0.877   R^2 (5-fold CV) = 0.860   predictors: behavior_01..12 (12 items)

>> COMMENTARY (narration):
    We predicted performance from 12 correlated behavior items. Because the items are highly correlated
    (multicollinearity), classic regression becomes unstable; PLS reduces them to a few latent components and
    regresses on those. With cross-validated R^2 = 0.86, the model is both strong and generalizable. PLS is ideal
    when predictors are numerous or highly correlated; in business it is widely used for predicting an outcome from
    many correlated indicators.

====================================================================================

#45  Probit Regression
    file: 45_probit.xlsx
  >> SCENARIO (narration):
    We estimate profitability from operation hours with a probit model. For a binary
    outcome, probit (normal link) is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: profitable
    - Predictor(s): operation_hour

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Classification metrics added: accuracy / sensitivity / specificity / AUC (marginal effects + McFadden already shown).

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 97.53   Pseudo R^2 (McFadden) = 0.603   binary outcome: profitable   predictor: operation_hour

>> COMMENTARY (narration):
    We estimated the probability of profitability (profitable: yes/no) from operation hours with a probit model: the
    model is very strong (pseudo R^2 = 0.60). Probit, like logistic, applies to binary outcomes; the difference is
    that its link function is the normal distribution (logistic in logit). Results are usually similar; probit is
    preferred where an underlying latent normal variable is natural. In business it is a robust alternative to
    logistic for binary decision/outcome modeling.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Classification metrics added: accuracy / sensitivity / specificity / AUC (marginal effects + McFadden already shown).

====================================================================================

#46  Tobit Regression
    file: 46_tobit.xlsx
  >> SCENARIO (narration):
    We model a zero-piled investment variable with income and child count. For a
    censored outcome, tobit is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: investment_tuition
    - Predictor(s): income
    - Predictor(s): child_count

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AIC = 475.35   Left censor = 0   income coef = 0.152 (p < .001), child_count = -1051.8 (p < .001)
    outcome: investment_tuition (censored)   predictors: income, child_count

>> COMMENTARY (narration):
    We modeled a lower-bounded (zero-piled) spending/investment variable with income and child_count. Income
    significantly increases investment, child count significantly decreases it. Tobit is for "censored" dependent
    variables that pile up at a threshold (here 0); ordinary regression gives biased estimates by ignoring this
    pile-up. In business it is the right model for floor-effect outcomes such as zero spending/zero investment.

====================================================================================

#47  Bayesian Linear Regression
    file: 47_bayesian.xlsx
  >> SCENARIO (narration):
    We model the rating with operation and age in a Bayesian framework. To express
    uncertainty probabilistically, Bayesian regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: rating
    - Predictor(s): operation
    - Predictor(s): age

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    sigma^2 posterior mean = 16.95 (sd = 2.42)   outcome: rating   predictors: operation, age
    coefficient posteriors + P(beta>0) reported

>> COMMENTARY (narration):
    We modeled the rating score with operation and age in a Bayesian framework: instead of point estimates we
    obtained each coefficient's full posterior distribution and the "probability the effect is positive". The
    Bayesian approach expresses uncertainty directly in probability language and can incorporate prior knowledge. In
    business, when the sample is small or prior-period information is valuable, it offers intuitive interpretations
    like "the effect is probably positive".

====================================================================================

#48  Nonlinear Regression
    file: 48_nonlinear.xlsx
  >> SCENARIO (narration):
    We model an outcome's S-shaped relationship with age via a logistic growth
    curve. For a curved relationship, nonlinear regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: word_count
    - Predictor(s): age
    - Value: fonksiyon/function: logistic

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Function: y = K / (1 + exp(-r*(x-x0)))  (logistic growth)   R^2 = 0.966

>> COMMENTARY (narration):
    We modeled the relationship of an outcome (word_count) with age not as a straight line but as an S-shaped logistic
    growth curve: the fit is very high (R^2 = 0.97). Nonlinear regression fits a theoretical function form directly to
    the data when the relationship is curved (saturation, threshold, exponential growth) and makes the parameters
    (ceiling K, rate r, inflection x0) interpretable. In business it is the right tool for modeling S-shaped processes
    such as adoption curves, saturating growth and learning curves.

====================================================================================

#49  Ridge Regression
    file: 49_ridge.xlsx
  >> SCENARIO (narration):
    We predict productivity from 15 correlated items with ridge. For
    multicollinearity, ridge is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: productivity
    - Predictor(s): item_p01..15

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Auto-alpha via cross-validation (RidgeCV): selects the optimal regularization strength automatically.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    alpha = 1.0   R^2 = 0.617   predictors: item_p01..15 (15 items)

>> COMMENTARY (narration):
    We predicted productivity from 15 correlated items with ridge regression (R^2 = 0.62). Ridge adds an L2 penalty
    to shrink all coefficients in magnitude without zeroing them; this prevents the instability caused by high
    correlation among predictors (multicollinearity). It gives more stable and generalizable estimates where classic
    regression's coefficients balloon and flip sign. In business it is preferred for prediction with many co-varying
    indicators.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Auto-alpha via cross-validation (RidgeCV): selects the optimal regularization strength automatically.

====================================================================================

#50  Lasso Regression
    file: 50_lasso.xlsx
  >> SCENARIO (narration):
    We model performance from 30 candidate features with lasso, selecting the
    important ones. For automatic variable selection, lasso is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: performance
    - Predictor(s): x01..30

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Auto-alpha via cross-validation (LassoCV): selects the optimal regularization strength automatically.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    alpha = 0.1   R^2 = 0.726   18 of 30 features shrunk to zero (automatic variable selection)

>> COMMENTARY (narration):
    We modeled performance from 30 candidate features with lasso regression: R^2 = 0.73, and lasso shrank 18 of the
    30 feature coefficients exactly to zero, selecting only 12 effective variables. This is its difference from ridge:
    because lasso can zero coefficients, it performs prediction and variable selection at the same time. In business
    it is very useful for automatically winnowing the "few truly important factors" out of many candidate indicators
    (a sparse, interpretable model).

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Auto-alpha via cross-validation (LassoCV): selects the optimal regularization strength automatically.

====================================================================================

#51  Mediation Analysis
    file: 51_mediation.xlsx
  >> SCENARIO (narration):
    We test the support -> productivity -> performance chain. To resolve the
    intermediate mechanism, mediation analysis is appropriate.
  >> VARIABLE SELECTION:
    - Predictor(s): parent_support
    - Value: M (aracі/mediator): productivity
    - Dependent variable: performance

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Indirect effect = 5.64   95% CI [3.91, 7.57]   (excludes zero -> significant)
    X: parent_support  M: productivity  Y: performance

>> COMMENTARY (narration):
    We tested the chain "support (X) -> productivity (M) -> performance (Y)": the indirect effect is 5.64, its 95% CI
    excludes zero -- so support's effect on performance occurs substantially through productivity. Mediation analysis
    resolves "why/how does X affect Y?" through an intermediate mechanism. In business it is powerful for understanding
    which intermediate process (motivation, productivity, process quality) an intervention's effect flows through.

====================================================================================

#52  Path Analysis
    file: 52_path.xlsx
  >> SCENARIO (narration):
    We test direct/indirect relationships as a single causal diagram. For a
    relationship network, path analysis is appropriate.
  >> VARIABLE SELECTION:
    - Value: performance ~ self_efficacy + productivity + effort
    - Value: productivity ~ self_efficacy

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    CFI = 0.866   RMSEA = 0.243   model: performance ~ self_efficacy + productivity + effort; productivity ~ self_efficacy

>> COMMENTARY (narration):
    We tested the direct and indirect relationships among several variables as a single causal diagram. The fit
    indices (CFI = 0.87, RMSEA = 0.24) show the model fits the data partially, with room for improvement. Path
    analysis estimates the whole relationship network at once instead of separate regressions; it shows how variables
    affect each other and a common outcome. In business it is used to test theory-based relationship models
    (self-efficacy -> productivity -> performance).

====================================================================================

#53  Linear Mixed Model (LMM)
    file: 53_lmm.xlsx
  >> SCENARIO (narration):
    We model repeatedly measured KPI taking firm as a random effect. For
    repeated/nested data, LMM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: kpi
    - Predictor(s): quarter
    - Cluster: firm_id (random)

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Nakagawa marginal R-squared (fixed effects) and conditional R-squared (fixed + random), beside ICC.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    ICC = 0.943   Group variance (random intercept) = 356.66   outcome: kpi   fixed: quarter   group: firm_id

>> COMMENTARY (narration):
    We modeled KPI measured repeatedly in the same firms, taking firm identity as a random effect. ICC = 0.94 is very
    high: almost all KPI variability comes from between-firm differences, while within-firm repeats are very similar.
    LMM correctly handles dependency in nested/repeated (measurements within firm) data; it solves the "independence"
    assumption that ordinary regression violates via random effects. In business it is the right choice for panel/
    repeated-measure data.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Nakagawa marginal R-squared (fixed effects) and conditional R-squared (fixed + random), beside ICC.

====================================================================================

#54  Multiple Imputation
    file: 54_multiple_imputation.xlsx
  >> SCENARIO (narration):
    Instead of deleting missing data we fill it with 5 plausible value sets. To
    handle missingness without bias, multiple imputation is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: kpi
    - Predictor(s): operation
    - Predictor(s): productivity
    - Predictor(s): riskaversion
    - Predictor(s): parent_investment

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    m (imputation) = 5   outcome: kpi   predictors: operation, productivity, riskaversion, parent_investment

>> COMMENTARY (narration):
    Instead of deleting missing data, we analyzed by producing 5 plausible value sets (m = 5) and combining the
    results. Multiple imputation -- unlike filling gaps with a single estimate (which ignores uncertainty) -- accounts
    for imputation uncertainty too, yielding unbiased estimates and correct standard errors. In business it is the
    modern standard for handling the inevitable gaps in survey/panel data without shrinking the sample or distorting
    results.

====================================================================================

#55  GEE
    file: 55_gee.xlsx
  >> SCENARIO (narration):
    We model productivity in repeated visit measures of the same firms. For a
    population-average effect, GEE is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: productivity
    - Predictor(s): visit
    - Cluster: firm_id

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    visit coef = 0.779   p = 0.042 *   QIC = 305.56   outcome: productivity   group: firm_id

>> COMMENTARY (narration):
    We modeled productivity in repeated visit measures of the same firms; the visit effect is significant (b = 0.78,
    p = 0.042). GEE estimates the POPULATION-AVERAGE effect rather than individual effects in repeated/clustered data
    and corrects within-group correlation with a "working correlation structure". While LMM focuses on individual
    random effects, GEE focuses on the average trend. In business it is preferred for population-level questions like
    "what is the effect of a visit in the average firm?".

====================================================================================

#56  GLMM
    file: 56_glmm.xlsx
  >> SCENARIO (narration):
    We model a repeatedly measured count outcome with month and policy, taking firm
    as a random effect. For repeated counts, GLMM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: compliance
    - Predictor(s): month
    - Predictor(s): policy
    - Cluster: firm_id (Poisson)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    policy coef = -0.206   p = 0.077 ns   outcome: compliance (count, Poisson)   group: firm_id

>> COMMENTARY (narration):
    We modeled a COUNT outcome (compliance count) measured repeatedly in the same firms with month and policy, taking
    firm as a random effect; the policy effect is borderline but non-significant (p = 0.077). GLMM extends LMM to
    non-normal outcomes (count, binary): it handles both the distribution (Poisson) and the clustering (random effect)
    at the same time. In business it is the right model for repeatedly measured binary/count outcomes (monthly
    violation count, churn).

====================================================================================

#57  Elastic Net
    file: 57_elasticnet.xlsx
  >> SCENARIO (narration):
    We model an index from 40 predictors with Elastic Net. For many clustered
    predictors, Elastic Net is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: index
    - Predictor(s): x01..40

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    alpha = 0.0746   L1 ratio = 0.50   R^2 (train) = 0.604   R^2 (CV) = 0.473   40 predictors

>> COMMENTARY (narration):
    We modeled an index from 40 predictors with Elastic Net. Elastic Net blends the ridge (L2) and lasso (L1)
    penalties (L1 ratio = 0.5): it both keeps groups of correlated variables together (ridge property) and zeroes out
    redundant ones (lasso property). Cross-validated R^2 = 0.47 measures generalizability. In business it is a
    balanced choice when there are many predictors clustered among themselves, where lasso or ridge alone is
    insufficient.

====================================================================================

#58  Robust Regression
    file: 58_robust.xlsx
  >> SCENARIO (narration):
    We model rating with operation, down-weighting outliers. For data with outliers,
    robust regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: rating
    - Predictor(s): operation

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Robust Intercept = 51.24   OLS Intercept = 49.14   outcome: rating   predictor: operation

>> COMMENTARY (narration):
    When modeling rating with operation, we used robust regression to prevent outliers from distorting the estimate.
    The gap between the robust and OLS intercepts (51.24 vs 49.14) shows a few outlying observations pull the classic
    estimate; the robust method down-weights them to reflect the "typical" relationship. In business it is the right
    way to get robust estimates without deleting outliers (abnormal transaction, erroneous record) in data that
    contains them.

====================================================================================

#59  Quantile Regression
    file: 59_quantile.xlsx
  >> SCENARIO (narration):
    We model different points of KPI's distribution (lower 10%, median, upper 90%)
    separately. For varying effects, quantile regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: kpi
    - Predictor(s): operation
    - Predictor(s): productivity
    - Quantiles: 0.10 / 0.50 / 0.90

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    separate slopes reported for q=0.10, q=0.50, q=0.90   outcome: kpi   predictors: operation, productivity

>> COMMENTARY (narration):
    We modeled not just KPI's mean but different points of the distribution (lower 10%, median, upper 90%) separately.
    Predictor effects can vary by quantile -- a factor may be strong for low-performing firms and weak for
    high-performing ones. Quantile regression gives the true picture when the "mean effect" is misleading (effect
    varies across the distribution). In business it shows what classic regression misses by examining inequality and
    extreme-group behavior.

====================================================================================

#60  ROC Curve
    file: 60_roc.xlsx
  >> SCENARIO (narration):
    We assess how well a continuous score separates a binary outcome with ROC. For
    discrimination and threshold selection, ROC is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: successful
    - Predictor(s): composite

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    AUC = 0.921 (excellent discrimination)   Youden optimum threshold = 0.710   Sensitivity = 0.787, 1-Specificity = 0.080
    n = 250 (positive 150, negative 100)

>> COMMENTARY (narration):
    We assessed how well a continuous score (composite) separates a binary outcome (successful) with a ROC curve:
    AUC = 0.92, excellent discrimination; the optimum decision threshold was set at 0.71 via Youden. ROC shows the
    sensitivity-specificity trade-off at all possible thresholds and evaluates the model without being tied to a
    single threshold. In business it is the standard tool for measuring a scoring/risk model's discriminative power
    and selecting the best decision threshold.

====================================================================================

#61  True Skill Statistic (TSS)
    file: 61_tss.xlsx
  >> SCENARIO (narration):
    We measure a classification model's discrimination with TSS. For a fair measure
    under class imbalance, TSS is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: pass
    - Predictor(s): kpi
    - Predictor(s): downtime

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    TSS = 0.34 (acceptable)   Sensitivity = 0.74   Specificity = 0.60   N = 200
    binary outcome: pass   predictors: kpi, downtime

>> COMMENTARY (narration):
    We measured a classification model's (pass/fail) discrimination success with TSS: TSS = 0.34 (sensitivity 0.74,
    specificity 0.60). TSS = sensitivity + specificity - 1; it excludes chance-expected success and gives a fair
    performance measure even with imbalanced classes. While accuracy can be biased (it anchors to the majority class),
    TSS evaluates the power to capture both positives and negatives together. In business it is robust for reporting
    the true discriminative power of risk/success classification models.

====================================================================================

#62  Confusion Matrix Metrics
    file: 62_complexity.xlsx
  >> SCENARIO (narration):
    We evaluate a classifier's predictions against true labels. For detailed
    performance, the confusion matrix is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: actual_label
    - 2nd measure / group: prediction_label

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Accuracy = 0.93   F1 = 0.918   (true label vs predicted label)

>> COMMENTARY (narration):
    We evaluated a classifier's predictions against true labels via a confusion matrix: accuracy 93%, F1 = 0.92. The
    confusion matrix gathers true/false positives and negatives in one table, from which sensitivity, specificity,
    precision and F1 are derived. Because a single accuracy number can mislead (especially with imbalanced classes),
    this metric set shows where the model errs. In business it is fundamental for detailed reporting of prediction/
    classification model performance.

====================================================================================

#63  Random Forest
    file: 63_rf.xlsx
  >> SCENARIO (narration):
    We classify sector from five features with a random forest. For nonlinear
    prediction, random forest is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: sector
    - Predictor(s): sales
    - Predictor(s): marketing
    - Predictor(s): kpi
    - Predictor(s): logistics
    - Predictor(s): age

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Accuracy = 0.757   outcome: sector   predictors: sales, marketing, kpi, logistics, age

>> COMMENTARY (narration):
    We classified sector from five features with a random forest: accuracy 75.7%. Random forest combines the votes of
    hundreds of decision trees; it automatically captures nonlinear relationships and interactions and also gives a
    variable-importance ranking. It reduces a single tree's overfitting by averaging. In business it is widely used
    for complex, nonlinear prediction problems (segment prediction, churn risk) because it offers both high accuracy
    and "which variable matters" information.

====================================================================================

#64  Support Vector Machines (SVM)
    file: 64_svm.xlsx
  >> SCENARIO (narration):
    We classify profitable/unprofitable from four features with SVM. For
    well-separable classes, SVM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: corporation_profitable
    - Predictor(s): kpi
    - Predictor(s): sales
    - Predictor(s): trial
    - Predictor(s): operation

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Accuracy = 1.00   outcome: corporation_profitable   predictors: kpi, sales, trial, operation

>> COMMENTARY (narration):
    We classified profitable/unprofitable from four features with SVM: accuracy 100% -- the classes are perfectly
    separable with these features (very high accuracy should be confirmed against overfitting via cross-validation).
    SVM finds the decision boundary separating classes with the widest margin; with the kernel trick it can also do
    nonlinear separation. In business it is a strong, stable classifier for well-separable class problems, especially
    on small-to-medium data.

====================================================================================

#65  Gradient Boosting
    file: 65_gradient_boosting.xlsx
  >> SCENARIO (narration):
    We classify churn risk from four predictors with gradient boosting. For top
    accuracy, gradient boosting is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: churn_risk
    - Predictor(s): kpi
    - Predictor(s): downtime
    - Predictor(s): volatility
    - Predictor(s): parent_joint

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Accuracy = 0.982   outcome: churn_risk   predictors: kpi, downtime, volatility, parent_joint

>> COMMENTARY (narration):
    We classified churn risk from four predictors with gradient boosting: accuracy 98.2%. Gradient boosting adds weak
    trees sequentially -- each new tree corrects the previous model's errors; this is why it wins most prediction
    competitions. While random forest votes in parallel, boosting reduces error step by step. In business it is
    preferred where the highest predictive accuracy is sought (risk scoring, churn prediction); it requires tuning
    against overfitting.

====================================================================================

#66  K-Means Clustering
    file: 66_kmeans.xlsx
  >> SCENARIO (narration):
    We cluster firms by four features. For segmentation, k-means is appropriate.
  >> VARIABLE SELECTION:
    - Variables: kpi
    - Variables: operation
    - Variables: sales
    - Variables: trial
    - Number of clusters: 4

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n_clusters = 4   Silhouette = 0.459   variables: kpi, operation, sales, trial

>> COMMENTARY (narration):
    We split firms into 4 clusters by four features (KPI, operation, sales, trial): silhouette = 0.46, reasonable-
    moderate separation. K-means assigns observations to the nearest cluster center and iteratively updates the
    centers; it groups similar firms into natural clusters. No labels are needed (unsupervised). In business it is the
    core method for customer/firm segmentation and market partitioning; silhouette checks the appropriateness of the
    cluster count.

====================================================================================

#67  Hierarchical Clustering
    file: 67_hierarchic.xlsx
  >> SCENARIO (narration):
    We hierarchically cluster firms by ten behavior items. For nested segment
    structure, hierarchical clustering is appropriate.
  >> VARIABLE SELECTION:
    - Variables: behavior_01..10
    - Number of clusters: 5

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n_clusters = 5   Silhouette = 0.123   variables: behavior_01..10 (10 items)

>> COMMENTARY (narration):
    We split firms into 5 groups by ten behavior items with hierarchical clustering (silhouette = 0.12, weak
    separation -- groups partly overlap). Hierarchical clustering merges observations step by step to build a tree
    (dendrogram); its difference from k-means is not having to fix the cluster count in advance and seeing the nested
    structure. In business it is used to explore a hierarchy of segments (main group -> sub-group) and to read the
    natural cluster count from the dendrogram.

====================================================================================

#68  DBSCAN Clustering
    file: 68_dbscan.xlsx
  >> SCENARIO (narration):
    We cluster firm locations with density-based DBSCAN. For spatial clusters and
    outliers, DBSCAN is appropriate.
  >> VARIABLE SELECTION:
    - Variables: lat
    - Variables: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n_clusters = 4   Silhouette = 0.916   variables: lat, lon (location)

>> COMMENTARY (narration):
    We clustered firm locations (lat, lon) with density-based DBSCAN: 4 dense clusters, silhouette = 0.92, very good
    separation. Unlike k-means, DBSCAN does not require the cluster count in advance, can find clusters of any shape,
    and marks sparse points as "noise". In business it is ideal for detecting spatial concentrations (branch clusters,
    customer hot zones) and isolating outlier locations.

====================================================================================

#69  Principal Component Analysis (PCA)
    file: 69_pca.xlsx
  >> SCENARIO (narration):
    We reduce six correlated indicators to a few components with PCA. For
    dimensionality reduction, PCA is appropriate.
  >> VARIABLE SELECTION:
    - Variables: sales
    - Variables: operations
    - Variables: marketing
    - Variables: logistics
    - Variables: logic
    - Variables: art

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    PC1 explains 88.3% of variance   variables: sales, operations, marketing, logistics, logic, art

>> COMMENTARY (narration):
    We reduced six correlated indicators to a few components with PCA: the first component alone explains 88% of
    variance -- so these six measures largely reflect a single latent dimension (overall performance/size). PCA
    transforms correlated variables into mutually independent components; it reduces dimensions, eases visualization
    and resolves multicollinearity. In business it is fundamental for summarizing multi-indicator data and building a
    "composite index".

====================================================================================

#70  t-SNE
    file: 70_tsne.xlsx
  >> SCENARIO (narration):
    We reduce 12-dimensional data to 2 dimensions with t-SNE for visualization. For
    nonlinear cluster discovery, t-SNE is appropriate.
  >> VARIABLE SELECTION:
    - Variables: item_01..12

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    KL Divergence = 0.544 (good)   high-dimensional 12 items embedded into 2 dimensions

>> COMMENTARY (narration):
    We reduced 12-dimensional data to 2 dimensions for visualization with t-SNE (KL = 0.54, good quality). t-SNE tries
    to preserve high-dimensional neighborhoods, placing similar observations near and dissimilar ones far; it reveals
    nonlinear cluster structures visually that PCA misses. Interpretation is visual (the axes have no absolute
    meaning). In business it is used for exploratory visualization before discovering hidden clusters in
    high-dimensional segment/behavior data.

====================================================================================

#71  Multidimensional Scaling (MDS)
    file: 71_mds.xlsx
  >> SCENARIO (narration):
    We place the inter-firm similarity structure onto a 2D map. For
    perceptual/similarity maps, MDS is appropriate.
  >> VARIABLE SELECTION:
    - Variables: kpi
    - Variables: operation
    - Variables: sales
    - Variables: operations
    - Variables: marketing

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Stress (Kruskal-1) = 0.052 (acceptable)   variables: kpi, operation, sales, operations, marketing

>> COMMENTARY (narration):
    We placed the distance/similarity structure among firms onto a 2-dimensional map with low stress (0.05): low
    stress means the map represents the true distances well. MDS positions observations in an interpretable space by
    preserving inter-observation distances; its difference from t-SNE is the aim of preserving global distance
    structure. In business it is used to draw product/firm/brand similarity maps (perceptual maps) and for competitive
    positioning.

====================================================================================

#72  UMAP
    file: 72_umap.xlsx
  >> SCENARIO (narration):
    We reduce 25-dimensional behavior data to 2 dimensions with UMAP. For both local
    and global structure, UMAP is appropriate.
  >> VARIABLE SELECTION:
    - Variables: behavior_01..25

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    25 behavior items embedded into 2 dimensions   (local-global balance via n_neighbors / min_dist)

>> COMMENTARY (narration):
    We reduced 25-dimensional behavior data to 2 dimensions with UMAP. UMAP does nonlinear dimensionality reduction
    like t-SNE but preserves both local and global structure better and is faster. Larger n_neighbors emphasizes
    broader groups, larger min_dist emphasizes the gaps between clusters. In business it is a modern choice for
    visualizing high-dimensional behavior/preference data and exploring natural cluster structure.

====================================================================================

#73  Cronbach's Alpha
    file: 73_cronbach.xlsx
  >> SCENARIO (narration):
    We measure the internal consistency of a 21-item scale. For scale reliability,
    Cronbach's alpha is appropriate.
  >> VARIABLE SELECTION:
    - Variables: item_01..21

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Cronbach alpha = 0.972 (excellent internal consistency)   21 items

>> COMMENTARY (narration):
    We measured the internal consistency of a 21-item scale with Cronbach's alpha: alpha = 0.97, excellent -- the
    items measure the same construct consistently. Cronbach's alpha shows how much the items of a scale "move
    together" (their equivalence); above 0.70 is considered acceptable. (A very high value can also signal item
    redundancy.) In business it is the standard index for reporting the reliability of satisfaction/engagement
    surveys.

====================================================================================

#74  Likert Scale Analysis
    file: 74_likert.xlsx
  >> SCENARIO (narration):
    We analyze a 15-item Likert set of three sub-scales. For ordinal scale summary
    and reliability, Likert analysis is appropriate.
  >> VARIABLE SELECTION:
    - Variables: productivity_1..5 / self_efficacy_1..5 / riskaversion_1..5

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Number of items k = 15   Cronbach alpha = 0.776 (acceptable)

>> COMMENTARY (narration):
    We analyzed a 15-item Likert set made of three sub-scales (productivity, self-efficacy, risk aversion):
    reliability is acceptable (alpha = 0.78), and item distributions and central tendencies were reported. Likert
    analysis describes ordinal scale responses (1-5) with appropriate summaries (median, distribution, pile-up) and
    checks scale reliability. In business it is used for correctly summarizing and interpreting attitude/perception
    surveys (satisfaction, engagement).

====================================================================================

#75  Exploratory Factor Analysis (EFA)
    file: 75_efa.xlsx
  >> SCENARIO (narration):
    We discover the latent factors behind eighteen items. For scale-structure
    discovery, EFA is appropriate.
  >> VARIABLE SELECTION:
    - Variables: q01..18

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    KMO = 0.908 (excellent)   factor analysis appropriate   18 items (q01..18)

>> COMMENTARY (narration):
    We applied EFA to discover how many latent factors lie behind eighteen items: KMO = 0.91, the data is very
    suitable for factor analysis. EFA reduces observed items to a few unobserved "factors"; it reveals which items
    measure the same dimension. In business it is fundamental when developing a new scale (discovering the survey's
    structure) and mapping item groups to theoretical dimensions; KMO and Bartlett are prerequisite tests.

====================================================================================

#76  Intraclass Correlation (ICC)
    file: 76_icc.xlsx
  >> SCENARIO (narration):
    We measure the consistency of continuous scores from three managers. For
    inter-rater reliability on continuous scores, ICC is appropriate.
  >> VARIABLE SELECTION:
    - Variables: manager_a
    - Variables: manager_b
    - Variables: manager_c

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    ICC(1,1) = 0.961 (Excellent)   95% CI [0.940, 0.980]   3 raters (manager_a/b/c)

>> COMMENTARY (narration):
    We measured the consistency of scores three managers gave to the same units with ICC: ICC = 0.96, excellent --
    the raters score almost identically. Unlike kappa, ICC measures inter-rater reliability on CONTINUOUS scores and
    can assess both consistency and absolute agreement. In business it is the standard index for determining how
    reliable/interchangeable different auditors' scores (risk grade, quality class) are in performance/quality
    evaluations.

====================================================================================

#77  Confirmatory Factor Analysis (CFA)
    file: 77_cfa.xlsx
  >> SCENARIO (narration):
    We test whether a predefined three-factor structure fits the data. For construct
    validity, CFA is appropriate.
  >> VARIABLE SELECTION:
    - Value: self: self_1..4
    - Value: financial: financial_1..4
    - Value: social: social_1..4

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    CFI = 1.001   RMSEA = 0.000   3 factors: self / financial / social (4 items each)

>> COMMENTARY (narration):
    Unlike EFA, we TESTED whether a pre-defined three-factor structure (self/financial/social) fits the data with CFA:
    the fit indices are excellent (CFI = 1.00, RMSEA = 0.00). CFA tests a theoretical scale model -- which item loads
    on which factor is fixed in advance, and the question is "does the model fit the data?". In business it is a
    mandatory step for confirming the construct validity of a developed scale (do the satisfaction/engagement
    dimensions match theory).

====================================================================================

#78  Survey Mean
    file: 78_survey_means.xlsx
  >> SCENARIO (narration):
    We estimate the mean of the logistics indicator in a stratified/weighted survey.
    For a complex sample, design-based mean is appropriate.
  >> VARIABLE SELECTION:
    - Variables: survey_logistics
    - Weight: weight
    - Stratum: region

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    survey_logistics: M_hat = 458.99   SE = 3.99   95% CI [451.14, 466.83]   CV 0.87%
    weight: weight, stratum: region

>> COMMENTARY (narration):
    In a stratified/weighted survey design we estimated the mean of the logistics indicator while accounting for the
    design: M = 458.99, with a Taylor-linearization SE and 95% CI [451, 467]. Complex-sample methods account for
    unequal selection probabilities (weights) and stratification; ignoring these biases the standard errors. In
    business it is the right way to produce correct point estimates and confidence intervals from national/regional
    representative surveys (stratified, weighted).

====================================================================================

#79  Survey Frequency
    file: 79_survey_freq.xlsx
  >> SCENARIO (narration):
    We estimate category proportions of a categorical survey question accounting for
    the design. For a complex sample, design-based frequency is appropriate.
  >> VARIABLE SELECTION:
    - Variables: corporation_intention
    - Weight: weight
    - Stratum: region

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    weighted proportions + Taylor SE + 95% CI for corporation_intention categories
    (e.g. 'maybe' p_hat = 0.363, 'certain' p_hat = 0.095)

>> COMMENTARY (narration):
    We estimated the category proportions of a categorical survey question (incorporation intention) under sampling
    weights and stratification; each proportion has a design-based SE and confidence interval. Complex-survey
    frequency analysis, unlike a simple percentage, estimates population proportions without bias by accounting for
    the sampling design. In business it is used for correctly reporting category distributions (intention, preference)
    from representative surveys.

====================================================================================

#80  Survey Total
    file: 80_survey_total.xlsx
  >> SCENARIO (narration):
    We estimate the population total (total managers) from the sample. For a complex
    sample, design-based total is appropriate.
  >> VARIABLE SELECTION:
    - Variables: manager_count
    - Weight: weight
    - Stratum: stratum

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    manager_count: T_hat = 67,866   SE = 1,314.75   95% CI [65,278, 70,454]   stratum: stratum

>> COMMENTARY (narration):
    We estimated the population TOTAL (total manager count) from the sample: T = 67,866, 95% CI [65,278, 70,454].
    Weights tell how many population units each observation represents; the total is estimated by summing those
    weights, with uncertainty reported via Taylor SE. In business it is the right method for producing population-
    scaled totals (total turnover, total employment) from a sample.

====================================================================================

#81  Survey Regression
    file: 81_survey_reg.xlsx
  >> SCENARIO (narration):
    We regress a survey outcome accounting for the design. For relationships in
    complex samples, design-based regression is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: survey
    - Predictor(s): age
    - Predictor(s): volatility
    - Weight: weight
    - Stratum: region

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    R^2 = 0.185   age coef = 14.12 (p < .001)   outcome: survey   predictors: age, volatility   weight: weight

>> COMMENTARY (narration):
    We regressed a survey outcome while accounting for the sampling design (weight, stratum): age is a significant
    predictor (b = 14.12, p < .001), and the model explains 18.5% of variance. Design-based regression incorporates
    weights and the cluster/stratum structure into coefficient and standard-error calculation; ordinary regression
    ignores these and gives biased inference. In business it is the right way to model relationships in representative
    survey data.

====================================================================================

#82  Survey Logistic Regression
    file: 82_survey_logistic.xlsx
  >> SCENARIO (narration):
    We model a binary survey outcome (profitable) with design-weighted logistic. For
    binary outcomes in complex samples, this is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: corporation_profitable
    - Predictor(s): kpi
    - Predictor(s): volatility
    - Weight: weight
    - Stratum: region

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    kpi: OR = 1.053   p < .001 ***   binary outcome: corporation_profitable   predictors: kpi, volatility   weight: weight

>> COMMENTARY (narration):
    We modeled a binary survey outcome (profitable) with design-weighted logistic regression: each one-unit increase
    in KPI raises the profitability odds by ~5.3% (OR = 1.053, p < .001). This method extends logistic regression to
    complex sample designs -- weight and stratum are reflected in the standard errors. In business it is used to
    correctly estimate the probability of a binary outcome (profitable/loss, satisfied/not) from representative
    surveys.

====================================================================================

#83  Generalized Additive Model (GAM)
    file: 83_gam.xlsx
  >> SCENARIO (narration):
    We model rating with operation via a flexible curve. For a nonlinear effect, GAM
    is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: rating
    - Predictor(s): operation (smooth)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Pseudo R^2 (explained) = 0.756   outcome: rating   predictor: operation (smooth term)

>> COMMENTARY (narration):
    We modeled rating with operation, without assuming a straight line in advance, via a flexible curve (smooth): the
    explained variance is high (pseudo R^2 = 0.76). GAM extends linear regression -- it models each predictor's effect
    as a smooth function learned from the data, capturing curved relationships without losing interpretability. In
    business it is a more explanatory choice than black-box models for relationships where the effect is nonlinear
    (saturation, threshold).

====================================================================================

#84  Discriminant Analysis
    file: 84_diskriminant.xlsx
  >> SCENARIO (narration):
    We classify firm segment from five continuous measures. To assign to predefined
    groups, discriminant analysis is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: segment
    - Predictor(s): sales
    - Predictor(s): operations
    - Predictor(s): kpi
    - Predictor(s): downtime
    - Predictor(s): operation

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Accuracy = 1.00   outcome: segment   predictors: sales, operations, kpi, downtime, operation

>> COMMENTARY (narration):
    We classified firm segment from five continuous measures with discriminant analysis: accuracy 100% -- the segments
    are fully separable with these measures (overfitting risk should be checked via cross-validation). Discriminant
    analysis finds the linear combinations that best separate groups; it both classifies and shows which variable is
    most influential in separation. In business it is used to assign new firms to predefined segments and to identify
    discriminating features.

====================================================================================

#85  Conditional Logit
    file: 85_conditional_logit.xlsx
  >> SCENARIO (narration):
    We model firms' choices among alternatives by option features. For
    discrete-choice data, conditional logit is appropriate.
  >> VARIABLE SELECTION:
    - Chooser: firm_id
    - Choice: chosen
    - Alternative features: fee
    - Alternative features: distance_km

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    McFadden pseudo R^2 = 1.00   chooser: firm_id   choice: chosen   features: fee, distance_km

>> COMMENTARY (narration):
    We modeled the choices firms made among alternatives by the alternatives' features (fee, distance) with a
    conditional logit. This model is for "discrete choice" data where each individual picks one from a choice set; it
    estimates how an option's features affect its probability of being chosen. Its difference from standard logistic
    is that the choice is conditional on the individual's option set. In business it is the core method for modeling
    consumer/firm preferences (price-distance-feature effects).

====================================================================================

#86  Kaplan-Meier Survival
    file: 86_km.xlsx
  >> SCENARIO (narration):
    We examine firms' time to an event and group differences. For censored time
    data, Kaplan-Meier is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: graduate
    - Grouping (categorical): department

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Median survival = 8.4 quarters   Log-rank chi^2(2) = 1.17, p = 0.557 ns   time: duration_quarter, event: graduate, group: department

>> COMMENTARY (narration):
    We examined the time firms take to reach an event (graduate/exit) with Kaplan-Meier: median survival 8.4 quarters;
    department survival curves were compared with the log-rank test (p = 0.56, no difference). KM correctly handles
    censored time data (those whose event has not yet occurred); a plain average ignores these observations and is
    biased. In business it is fundamental for customer/employee/contract "lifetime" and churn-timing analysis.

====================================================================================

#87  Cox Proportional Hazards
    file: 87_cox.xlsx
  >> SCENARIO (narration):
    We examine churn risk with continuous and categorical predictors in a Cox model.
    For multiple predictors in censored time, Cox is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: churn
    - Predictor(s): age
    - Predictor(s): kpi
    - Predictor(s): scholarship
    - Predictor(s): family_support

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Proportional-hazards assumption test (Schoenfeld): per-covariate chi-square/p; significant = PH violated, consider a time-varying effect.

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    kpi: HR = 0.983   p = 0.002 **   (each KPI unit ~ 1.7% lower event risk)
    time: duration_quarter, event: churn   predictors: age, kpi, scholarship, family_support

>> COMMENTARY (narration):
    We examined churn risk with continuous and categorical predictors in a Cox model: each one-unit increase in KPI
    reduces the event (churn) hazard by ~1.7% (HR = 0.983, p = 0.002). Cox regression gives the effect of several
    predictors on "event time" as hazard ratios (HR) in censored time data, making no assumption about the baseline
    hazard's shape. In business it is the gold standard for identifying the factors that drive churn/bankruptcy/fault
    risk.

  >> ADVANCED PARAMETERS (optional in the form — what they do):
    - Proportional-hazards assumption test (Schoenfeld): per-covariate chi-square/p; significant = PH violated, consider a time-varying effect.

====================================================================================

#88  Parametric Survival (AFT)
    file: 88_aft.xlsx
  >> SCENARIO (narration):
    We model survival time assuming a Weibull distribution. For explicit time
    estimation, AFT is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: graduate
    - Predictor(s): scholarship

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Distribution: Weibull   Median survival = 6.91 quarters   time: duration_quarter, event: graduate, predictor: scholarship

>> COMMENTARY (narration):
    We modeled survival time by assuming a parametric (Weibull) distribution: median survival ~6.9 quarters. AFT
    (accelerated failure time) models, unlike Cox, choose an explicit distribution for the hazard shape and directly
    interpret how predictors "accelerate/decelerate" time. If the data fit the assumed distribution they are more
    powerful than Cox. In business they are preferred when explicit time estimation and extrapolation are needed.

====================================================================================

#89  Competing Risks
    file: 89_competing.xlsx
  >> SCENARIO (narration):
    We model a setting where a firm can meet several distinct ends. For mutually
    exclusive events, competing risks is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: separation -> olay tipi / event type
    - Predictor(s): kpi

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Censored (0) = 49   different separation types modeled as distinct event types

>> COMMENTARY (narration):
    We examined a setting where a firm can meet more than one distinct end (separation types) in the competing-risks
    framework: 49 observations censored, the rest split into distinct event types. While standard survival treats all
    events alike, the competing-risks method accounts for the fact that "once one occurs the others no longer can" and
    gives a separate cumulative incidence for each event type. In business it is necessary to correctly model a firm's
    mutually exclusive distinct ends (bankruptcy, acquisition, merger).

====================================================================================

#90  Time-Dependent Cox
    file: 90_tvcox.xlsx
  >> SCENARIO (narration):
    We build a Cox model where the predictor changes over time. For a time-varying
    covariate, time-dependent Cox is appropriate.
  >> VARIABLE SELECTION:
    - Unit (id): firm_id
    - Start: start
    - Stop: end
    - Event: event
    - Predictor(s): kpi

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    kpi: HR = 1.001   p = 0.944 ns   (time-varying covariate)   id: firm_id, start/stop intervals

>> COMMENTARY (narration):
    We built a Cox model where the predictor (KPI) CHANGES over time: for each firm the current KPI value was used via
    start-stop intervals; the effect here is non-significant (HR = 1.001, p = 0.94). Time-dependent Cox correctly
    handles non-constant covariates (changing KPI, changing price) -- it uses the predictor's current value at the
    event time. In business it is the right method for modeling the effect of time-varying risk factors (changing
    performance, changing conditions) on an event.

====================================================================================

#91  Survey Cox Regression
    file: 91_survey_phreg.xlsx
  >> SCENARIO (narration):
    We carry survival analysis into a complex survey design (weight+cluster). For
    design-faithful event time, survey_phreg is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: churn
    - Predictor(s): region (faktorize/factorized)
    - Weight: weight
    - Cluster: company_id

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Concordance = 0.50   region_n: p = 0.863 ns   time: duration_quarter, event: churn   weight: weight, cluster: company_id

>> COMMENTARY (narration):
    We carried survival/churn analysis into a complex survey design (weight + cluster) with a Cox model: the region
    effect is non-significant (p = 0.86), concordance 0.50 (weak discrimination). survey_phreg extends the
    proportional-hazards model to a stratum/cluster/weight structure -- standard errors are corrected for the design.
    In business it is the design-faithful way to model event time (churn, bankruptcy) in representative panel/survey
    data.

====================================================================================

#92  Interval-Censored Survival
    file: 92_interval.xlsx
  >> SCENARIO (narration):
    We model data where the event is known only within an interval. For interval
    censoring, this is appropriate.
  >> VARIABLE SELECTION:
    - Lower bound: left_censor
    - Upper bound: survival_censor

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Number of events = 48   Median survival = 12.0   (lower bound: left_censor, upper bound: survival_censor)

>> COMMENTARY (narration):
    We modeled data where the exact event time is unknown and only known to have occurred within an INTERVAL: median
    survival 12 units, 48 events. Interval-censored methods are for cases where the event lies "somewhere between two
    observations" (between periodic inspections); fixing the event to the interval's mid/end point biases results,
    while this method carries the uncertainty correctly. In business it is used to correctly model events occurring
    between periodic inspections (deterioration between two audits).

====================================================================================

#93  Frailty Cox Model
    file: 93_frailty.xlsx
  >> SCENARIO (narration):
    We model the company-specific hidden risk as frailty in clustered survival data.
    For shared hidden risk, frailty Cox is appropriate.
  >> VARIABLE SELECTION:
    - Time: duration_quarter
    - Event: churn
    - Predictor(s): clinical_group (faktorize/factorized)
    - Cluster: company_id

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Concordance = 0.50   cg_n: p = 0.216 ns   time: duration_quarter, event: churn   cluster: company_id (frailty)

>> COMMENTARY (narration):
    In clustered survival data (firms within the same company) we modeled the company-specific unobserved risk as
    "frailty" (a random effect); the clinical-group effect is non-significant (p = 0.22). Frailty Cox accounts for the
    hidden risk shared by units in the same cluster -- solving the independence assumption that standard Cox violates.
    In business it is the right choice for event data clustered within branch/company/region (shared hidden risk).

====================================================================================

#94  Time Series Analysis
    file: 94_ts.xlsx
  >> SCENARIO (narration):
    We examine a monthly series (trend, season, stationarity). For time-dependent
    structure, time series analysis is appropriate.
  >> VARIABLE SELECTION:
    - Date: date
    - Value: record

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    60 observations (monthly)   ADF p = 0.858 (not stationary)   Trend: increasing   Seasonality detected

>> COMMENTARY (narration):
    We examined a monthly series (record): the ADF test shows it is not stationary (p = 0.86), with an increasing
    trend and seasonality. Time series analysis reveals the time-dependent structure (trend, season, autocorrelation)
    of observations; ordinary statistics are misleading because of this dependency. Stationarity is a prerequisite for
    models like ARIMA; if non-stationary, differencing is needed. In business it is the starting step for analyzing
    sales/demand/turnover series.

====================================================================================

#95  STL Decomposition
    file: 95_stl.xlsx
  >> SCENARIO (narration):
    We decompose the productivity series into trend, season and residual. For
    seasonal decomposition, STL is appropriate.
  >> VARIABLE SELECTION:
    - Date: date
    - Value: productivity

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Season period = 7   series decomposed into trend + season + residual components

>> COMMENTARY (narration):
    We decomposed the productivity series into three components with STL: trend, the seasonal pattern (period = 7),
    and residual. STL visually and numerically separates a time series' long-term trend, recurring seasonal pattern
    and unexplained fluctuation; this answers "what is the underlying trend, and how much is seasonal?". In business
    it is fundamental for de-seasonalizing sales/demand series to see the underlying trend and for anomaly detection.

====================================================================================

#96  ARIMA Forecast
    file: 96_arima.xlsx
  >> SCENARIO (narration):
    We model the series with ARIMA and produce a forecast. For demand/sales
    forecasting, ARIMA is appropriate.
  >> VARIABLE SELECTION:
    - Date: date
    - Value: graduate

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    ARIMA model selected   AIC = 2512.56   forecast + confidence interval

>> COMMENTARY (narration):
    We modeled the series (graduate) with ARIMA and produced a forecast (AIC = 2512.56 for model selection). ARIMA
    forecasts the future from the series' own past values (AR), trend (I - differencing) and past errors (MA); on a
    stationarized series it gives strong short-to-medium-term forecasts. In business it is the most common classical
    method for demand/sales/inventory forecasting; the confidence interval shows the forecast uncertainty.

====================================================================================

#97  Exponential Smoothing (ETS)
    file: 97_ets.xlsx
  >> SCENARIO (narration):
    We model the application series with Holt-Winters exponential smoothing. For a
    seasonal trended series, ETS is appropriate.
  >> VARIABLE SELECTION:
    - Date: date
    - Value: application

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Method: Holt-Winters (seasonal additive, period = 12)   AIC = 965.83

>> COMMENTARY (narration):
    We modeled the application series with Holt-Winters exponential smoothing: it jointly estimates the level, trend
    and a 12-period seasonal component. ETS tracks the series' current level, trend and season by weighting recent
    observations more (exponentially decaying weights); for seasonal and trended series it is a practical alternative
    to ARIMA. In business it gives fast, reliable results for sales/demand forecasting with regular seasonal patterns.

====================================================================================

#98  Mann-Kendall Trend
    file: 98_mann_kendall.xlsx
  >> SCENARIO (narration):
    We test a significant trend in the logistics rating series without
    distributional assumptions. For robust trend detection, Mann-Kendall is
    appropriate.
  >> VARIABLE SELECTION:
    - Value: logistics_rating

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    p < .001 ***   significant trend detected   (trend magnitude via Sen's slope)   variable: logistics_rating

>> COMMENTARY (narration):
    We tested whether the logistics rating series has a significant trend -- without assuming a distribution -- with
    Mann-Kendall: p < .001, a significant trend; Sen's slope gives the robust (outlier-resistant) magnitude of the
    trend. Mann-Kendall is a nonparametric trend test; it requires no normality and is resistant to outliers, hence
    common in environmental/time-series work. In business it is used to robustly detect long-term indicator trends
    (increasing/decreasing).

====================================================================================

#99  Anomaly Detection
    file: 99_anomali.xlsx
  >> SCENARIO (narration):
    We detect unusual observations in multivariate data. For composite outlier
    detection, anomaly detection is appropriate.
  >> VARIABLE SELECTION:
    - Variables: kpi
    - Variables: operation
    - Variables: absent
    - Variables: rating

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Number of anomalies = 18   variables: kpi, operation, absent, rating

>> COMMENTARY (narration):
    We automatically detected unusual observations in multivariate data: 18 firms were flagged as anomalies. Anomaly
    detection finds observations that deviate markedly from normal (erroneous record, fraud, exceptional case) by
    evaluating several variables together; it catches "composite" outliers that univariate thresholds miss. In
    business it is used for quality control, fraud/error detection and the early detection of exceptional firm
    behavior.

====================================================================================

#100  Variance Components
    file: 100_varcomp_3level_h2.xlsx
  >> SCENARIO (narration):
    We decompose revenue variability into nested levels (region, branch). For
    hierarchical variability, variance components is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: revenue
    - Factor (categorical): region_branch
    - Factor (categorical): branch_branch (nested)

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Random factors: region_branch + branch_branch (nested within region)   % contribution of each component + residual

>> COMMENTARY (narration):
    We decomposed revenue variability into nested levels -- region and branch within region: the percent contribution
    of each level and the residual were reported. Variance components analysis answers "how much of the variability is
    between regions, how much between branches, how much within branch?". In business it is used in hierarchical
    structures (region>branch>transaction) to see where uncertainty concentrates and in sampling/monitoring design.

====================================================================================

#101  Bayesian t-Test
    file: 101_bayesian_t_test_new_old.xlsx
  >> SCENARIO (narration):
    We examine two groups' revenue difference with a Bayesian t-test, expressing
    evidence as a Bayes factor. For an intuitive evidence ratio, this is
    appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: revenue
    - Grouping (categorical): group

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    BF10 = 3.55e+29   Cohen's d = 2.250   (overwhelming evidence for H1)   outcome: revenue, group: group

>> COMMENTARY (narration):
    We examined the revenue difference between two groups (new/old) with a Bayesian t-test: the Bayes factor is
    overwhelming (BF10 ~ 3.6e29), the effect very large (d = 2.25) -- the data support the "difference" hypothesis
    over "no difference" by astronomical odds. Unlike a p-value, the Bayes factor gives the RELATIVE evidence strength
    of two hypotheses and can distinguish "no evidence" from "no difference". In business it is preferred when one
    wants to express the evidential strength of a decision as an intuitive ratio.

====================================================================================

#102  Bayesian Correlation
    file: 102_bayesian_correlation_BF10.xlsx
  >> SCENARIO (narration):
    We evaluate the relationship between two variables in a Bayesian framework. For
    evidential strength, Bayesian correlation is appropriate.
  >> VARIABLE SELECTION:
    - 1st measure / group: X_variable
    - 2nd measure / group: Y_variable

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    r = 0.780 (very strong)   BF10 = 4.50e+14   (overwhelming evidence for a relationship)

>> COMMENTARY (narration):
    We evaluated the relationship between two variables in a Bayesian framework: r = 0.78 and BF10 ~ 4.5e14, i.e. very
    strong evidence for a relationship. Bayesian correlation, instead of a classical p-value, presents the evidential
    strength of the relationship as a Bayes factor and the coefficient's posterior distribution. In business it is
    valuable for reporting not just whether the relationship between two indicators is "significant" but how strongly
    it is "evidenced".

====================================================================================

#103  Bayesian ANOVA
    file: 103_bayesian_anova_2way.xlsx
  >> SCENARIO (narration):
    We examine revenue differences across two factors with Bayesian ANOVA. For the
    evidential strength of factor effects, this is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: revenue
    - Factor (categorical): factor1
    - 2nd Factor: factor2

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    factor1: BF10 = 76099 (very strong evidence)   outcome: revenue, factors: factor1, factor2

>> COMMENTARY (narration):
    We examined the revenue difference across two factors with Bayesian ANOVA: for factor1, BF10 ~ 76,000, very strong
    evidence. Bayesian ANOVA compares the effects of factors and their interactions via Bayes factors; it ranks
    probabilistically which model (which effects) best explains the data. Unlike classical ANOVA's "reject/don't
    reject" decision, it quantifies the relative support among models. In business it is used to compare the
    evidential strength of factor effects.

====================================================================================

#104  Bayesian Hierarchical Model
    file: 104_hierarchical_bayesian_LMM.xlsx
  >> SCENARIO (narration):
    We analyze group-nested data with a Bayesian hierarchical model. For stable
    estimates in small groups, this is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: Y_response
    - Cluster: group_id
    - Predictor(s): X_covariate

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    sigma^2_u (group) = 2.90 (8.6%)   sigma^2_eps (residual) = 30.79 (91.4%)   outcome: Y_response, group: group_id

>> COMMENTARY (narration):
    We analyzed group-nested data with a Bayesian hierarchical (multilevel) model: 8.6% of variability is
    between-group, 91.4% within-group (ICC ~ 0.09). The Bayesian hierarchical model is the Bayesian version of LMM --
    it estimates group effects with posterior distributions and balances small groups via "partial pooling". In
    business it is powerful for producing stable estimates even in small groups within multilevel (region/branch/firm)
    data.

====================================================================================

#105  Spatial SAR
    file: 105_spatial_sar_spatial.xlsx
  >> SCENARIO (narration):
    When modeling revenue we handle spatial spillover with SAR. For neighborhood
    effects, SAR is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: Y_revenue
    - Predictor(s): X1
    - Predictor(s): X2
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    rho = 0.336   z = 4.94   p < .001 ***   Pseudo R^2 = 0.87   (N = 100, k-NN W, k = 5)
    outcome: Y_revenue, predictors: X1, X2

>> COMMENTARY (narration):
    When modeling revenue (Y_revenue), we handled spatial spillover (the effect of neighboring units) with SAR: the
    spatial lag parameter is significant and positive (rho = 0.34, p < .001) -- a unit's revenue is related to its
    neighbors' revenue, a "cluster/spillover" pattern. SAR incorporates spatial dependency into the model; if ignored,
    standard errors are biased. In business it is the right method for modeling the geographic spread of branch/market
    performance (neighborhood effect).

====================================================================================

#106  Spatial Error Model
    file: 106_spatial_error_residual.xlsx
  >> SCENARIO (narration):
    We model spatial dependency in the error term. For unmeasured geographic
    factors, SEM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: Y_revenue
    - Predictor(s): X1
    - Predictor(s): X2
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    lambda = 0.590   z = 6.38   p < .001 ***   Pseudo R^2 = 0.84   (N = 100, k-NN W, k = 5)

>> COMMENTARY (narration):
    This time we modeled spatial dependency in the ERROR term: spatial error autocorrelation is significant (lambda =
    0.59, p < .001) -- the effect of geographic variables omitted from the model makes neighboring errors correlated.
    Unlike SAR, SEM attributes the spread to the error rather than the outcome. In business, when the source of
    spatial autocorrelation is unmeasured geographic factors (climate, infrastructure), the correct specification is
    SEM; it is chosen by comparison with SAR.

====================================================================================

#107  Geographically Weighted Regression (GWR)
    file: 107_gwr_local.xlsx
  >> SCENARIO (narration):
    Assuming the relationship is not constant in space, we estimate separate
    coefficients per location. For spatial heterogeneity, GWR is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: Y_revenue
    - Predictor(s): X1
    - Predictor(s): X2
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    R^2 = 0.887   local coefficients vary by location   outcome: Y_revenue, predictors: X1, X2

>> COMMENTARY (narration):
    Assuming the relationship is NOT constant across space, we estimated SEPARATE coefficients for each location
    (R^2 = 0.89). Unlike "global" regression, GWR fits a separate model at each point with local overlap/weights; this
    answers "how does this variable's effect vary by region?" and maps spatial heterogeneity. In business it is
    powerful where market dynamics differ by region (price sensitivity differing in center vs periphery).

====================================================================================

#108  Nested Mixed Model
    file: 108_nested_lmm_R_P_F.xlsx
  >> SCENARIO (narration):
    We model revenue in a nested design (region>branch/block). For nested
    hierarchies, nested LMM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: revenue
    - Factor (categorical): branch_group_no
    - Factor (categorical): region_group
    - Factor (categorical): block

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    block [within region_group] effect: F = 2.20, p = 0.023 *   nested variance components

>> COMMENTARY (narration):
    We modeled revenue in a nested design (region > branch/block): the inner grouping level (block) makes a
    significant contribution (F = 2.20, p = 0.023). Nested LMM correctly handles hierarchies where sub-units are
    nested within super-units (each block belongs to only one region); by partitioning variance into levels it shows
    each layer's share. In business it is used to correctly separate effects in geographic/organizational hierarchies
    (region>branch>team).

====================================================================================

#109  Crossed Mixed Model
    file: 109_crossed_lmm_A_B.xlsx
  >> SCENARIO (narration):
    We model a design where two random factors are crossed. For two independent
    classification axes, crossed LMM is appropriate.
  >> VARIABLE SELECTION:
    - Dependent variable: revenue
    - Factor (categorical): factor_a
    - 2nd Factor: factor_b

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    two crossed random factors (factor_a x factor_b)   variance contribution of each component   outcome: revenue

>> COMMENTARY (narration):
    We modeled a design where two random factors are crossed rather than nested (each level of A pairs with each level
    of B): the contribution of each factor to revenue variability was estimated separately. Crossed LMM, unlike
    nested, handles two independent grouping axes (e.g. product x region, each product in each region) at once. In
    business it is the right choice for jointly analyzing the effects of two independent classification axes (rater x
    unit, product x market).

====================================================================================

#110  Kernel Density (KDE) Map
    file: 110_KDE_marketsize_density.xlsx
  >> SCENARIO (narration):
    We produce a continuous density surface from firm locations. For a
    market-concentration map, KDE is appropriate.
  >> VARIABLE SELECTION:
    - Value: monthly_income_TL
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n = 95 firms   income/size-weighted spatial density surface (continuous heat map)

>> COMMENTARY (narration):
    Using firm locations (n = 95) we produced a continuous density surface (a KDE heat map): the point distribution
    was turned into a smooth "density" surface. KDE answers "where is it dense?" from scattered point data as a
    continuous map; it shows the trend rather than individual points. In business it is the core spatial tool for
    visually mapping market/customer/branch concentrations and identifying empty/saturated zones.

====================================================================================

#111  Hexbin Density Map
    file: 111_Hexbin_firm_distribution.xlsx
  >> SCENARIO (narration):
    We aggregate firm distribution into hexagonal cells to show density. For the
    over-plotting problem, hexbin is appropriate.
  >> VARIABLE SELECTION:
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    n = 150 firms   spatial density via aggregation into hexagonal cells

>> COMMENTARY (narration):
    We colored firm distribution (n = 150) by counting within hexagonal cells. Hexbin aggregates many overlapping
    points (the over-plotting problem) into a regular hexagonal grid to show density clearly; compared with squares it
    carries less directional bias. In business it is used to turn dense point clouds (branch/customer locations) into
    a readable density map and to compare spatial concentrations.

====================================================================================

#112  Moran's I
    file: 112_Morans_I_socioeconomic_autocorrelation.xlsx
  >> SCENARIO (narration):
    We test whether income is distributed randomly or in clusters across space. For
    spatial autocorrelation, Moran's I is appropriate.
  >> VARIABLE SELECTION:
    - Value: monthly_income_TL
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Moran's I = 0.467   z = 8.31   p < .001 ***   (k-NN neighbors, k = 6)   variable: monthly_income_TL

>> COMMENTARY (narration):
    We tested whether income is distributed randomly or in clusters across space with Moran's I: I = 0.47, z = 8.31,
    p < .001 -- strong positive spatial autocorrelation, i.e. similar income levels cluster geographically (the
    wealthy with the wealthy, the lower-income together). Moran's I quantifies "Tobler's first law" (near things are
    similar). In business it is the first test for detecting the geographic clustering of socioeconomic variables and
    for deciding whether a spatial model is needed.

====================================================================================

#113  Getis-Ord Gi*
    file: 113_Getis_Ord_high_income_hotspot.xlsx
  >> SCENARIO (narration):
    We map locally where income clusters high/low. For hot/cold spots, Getis-Ord is
    appropriate.
  >> VARIABLE SELECTION:
    - Value: monthly_income_TL
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Hot spots = 27   Cold spots = 27   n = 68   (k-NN k = 8, binary weights)   variable: monthly_income_TL

>> COMMENTARY (narration):
    We mapped WHERE income clusters high/low locally with Getis-Ord Gi*: 27 significant hot spots (high-income
    clusters) and 27 cold spots (low-income clusters). While Moran's I states the overall clustering, Gi* shows its
    location -- for each point it tests "is the surrounding area high or low?". In business it is used to pinpoint
    high-value/opportunity zones (hot spots) and lagging zones (cold spots) for targeted investment/planning.

====================================================================================

#114  DBSCAN Spatial Clustering
    file: 114_DBSCAN_neighborhood_clusters.xlsx
  >> SCENARIO (narration):
    We cluster firm locations with density-based DBSCAN. For spatial clusters and
    outlier locations, DBSCAN is appropriate.
  >> VARIABLE SELECTION:
    - Latitude: lat
    - Longitude: lon

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Clusters = 4   Noise (outliers) = 11   n = 115   (location: lat, lon)

>> COMMENTARY (narration):
    We clustered firm locations (n = 115) with density-based DBSCAN: 4 natural geographic clusters and 11 "noise"
    (scattered, cluster-less) points. DBSCAN does not require the cluster count in advance, finds clusters of any
    shape, and separates sparse points as outliers -- ideal for spatial clustering. In business it is used to detect
    natural neighborhood/region-level concentrations (customer/branch clusters) and to isolate isolated locations; it
    completes our descriptive spatial analysis series.

====================================================================================

#115  Mixed-Design (Split-Plot) ANOVA
    file: 115_mixed_anova_revenue_growth_pct.xlsx
  >> SCENARIO (narration):
    We follow 40 firms measured at three quarter levels (Q1, Q2, Q3); each belongs to one of two sector groups (manufacturing / service). A mixed (split-plot) design tests the between-subjects
    main effect, the within-subjects main effect and their interaction on revenue growth (%).
  >> VARIABLE SELECTION:
    - Dependent variable: revenue_growth_pct
    - Subject ID: firm_id
    - Between-subjects factor: sector
    - Within-subjects factor: quarter

  ----- RESULT & COMMENTARY -----
>> RESULT (screen):
    Between (sector): F(1,38) = 2.34  p = 0.135  np2 = 0.058
    Within (quarter):  F(2,76) = 19.74  p < .001  np2 = 0.342
    Interaction:         F(2,76) = 2.22  p = 0.116  np2 = 0.055
    Mauchly W = 0.828  p = 0.027   n_subjects = 40   n_obs = 120

>> COMMENTARY (narration):
    In a sector x quarter mixed design we analyzed revenue growth (%) for 40 firms (120 observations). The interaction is not significant (F(2,76) = 2.22, p = 0.116, np2 = 0.055) ns -- the two groups follow a statistically parallel change across quarter. The between-subjects main effect (manufacturing vs service) is F = 2.34, p = 0.135; the within-subjects main effect (Q1/Q2/Q3) is F = 19.74, p < .001. Mauchly's test p = 0.027, so sphericity is violated, so the Greenhouse-Geisser corrected within p is read. Read the interaction first: when it is significant the group effect must be interpreted separately at each quarter level. In business and economics, the mixed design is the standard analysis for tracking firm performance across quarters by sector.

====================================================================================
