import streamlit as st import pandas as pd st.markdown(""" """, unsafe_allow_html=True) st.latex(r''' \textbf{\Huge Levels of Measurement} \\[15pt] \text{\huge \(\downarrow\)} \\[10pt] \begin{array}{l} \textbf{\Huge Measurement Levels} \\ \quad \text{\huge \(\Downarrow\)} \\[10pt] \quad \textbf{\underline{1. \Large Nominal Level}} \\ \quad \quad \text{\huge \(\downarrow\)} \\[5pt] \quad \quad \textbf{Categories} \quad \text{\small (e.g., Gender, Color)} \\[10pt] \quad \text{\huge \(\Downarrow\)} \\[10pt] \quad \textbf{\underline{2. \Large Ordinal Level}} \\ \quad \quad \text{\huge \(\downarrow\)} \\[5pt] \quad \quad \textbf{Rank Order} \quad \text{\small (e.g., Customer Satisfaction, Rankings)} \\[10pt] \quad \text{\huge \(\Downarrow\)} \\[10pt] \quad \textbf{\underline{3. \Large Interval Level}} \\ \quad \quad \text{\huge \(\downarrow\)} \\[5pt] \quad \quad \textbf{Equal Intervals} \quad \text{\small (e.g., Temperature, IQ Scores)} \\[10pt] \quad \text{\huge \(\Downarrow\)} \\[10pt] \quad \textbf{\underline{4. \Large Ratio Level}} \\ \quad \quad \text{\huge \(\downarrow\)} \\[5pt] \quad \quad \textbf{Absolute Zero} \quad \text{\small (e.g., Height, Weight, Age)} \\[5pt] \end{array} ''') st.subheader("Nominal Level") st.markdown("""The **nominal level** of measurement categorizes data without any order or ranking, such as gender or colors. """,unsafe_allow_html=True) st.markdown(""" For **nominal data**, only **equality operators** (e.g., `=`, `!=`) can be used. This is because nominal data categorizes items without any inherent order or numerical value, so you can only check if two values are the same or different. """,unsafe_allow_html=True) st.subheader("Ordinal Level") st.markdown(""" **Ordinal level** represents categories with a meaningful order, but the intervals between values are not consistent or meaningful. """,unsafe_allow_html=True) st.markdown(""" **Ordinal data** supports the use of comparison operators (e.g., greater than, less than) to determine the relative ranking or order of categories. """,unsafe_allow_html=True) st.subheader("Interval Level") st.markdown(""" **Interval level** data has ordered categories with equal intervals between values, but lacks a true zero point (e.g., temperature in Celsius). """,unsafe_allow_html=True) st.markdown(""" **Interval data** supports arithmetic operators (e.g., addition, subtraction) and comparison operators (e.g., greater than, less than) since it has equal intervals between values but no true zero point. """,unsafe_allow_html=True) st.subheader("Ratio Level") st.markdown(""" **Ratio level** data has ordered categories with equal intervals and a true zero point, allowing for meaningful ratios between values (e.g., height, weight). """,unsafe_allow_html=True) st.markdown(""" **Ratio data** supports all arithmetic operators (e.g., addition, subtraction, multiplication, division) and comparison operators (e.g., greater than, less than) due to its true zero point and meaningful ratios. """,unsafe_allow_html=True)