flowchart LR
%% Styling definitions
classDef start fill:#FFFACD,stroke:#FF8C00,stroke-width:2px,color:#000
classDef decision fill:#E6F3FF,stroke:#1E88E5,stroke-width:2px,color:#000
classDef action fill:#E8F5E9,stroke:#43A047,stroke-width:2px,color:#000
classDef endStyle fill:#FFEBEE,stroke:#E53935,stroke-width:2px,color:#000
%% Nodes
%% Text wrapped to be tall/narrow to save horizontal space
A(["Start:<br/>Contingency<br/>Table"]):::start
B{"State H₀:<br/>Variables<br/>Indep."}:::decision
C{"Calculate<br/>Expected<br/>Counts"}:::decision
D{"Compute<br/>χ² Statistic"}:::decision
E{"Compare to<br/>χ² Dist."}:::decision
F["Reject H₀<br/>Evidence of<br/>Relationship"]:::action
G["Fail to<br/>Reject H₀<br/>No Evidence"]:::action
H["Interpret<br/>Association"]:::endStyle
%% Flow connections
A --> B
B --> C
C --> D
D --> E
E -->|p < α| F
E -->|p ≥ α| G
F --> H
G --> H

