Statisitcs 8/27
Qualitative vs Quantitative Data
In statistics, data are broadly categorized as qualitative (non-numeric, describes a characteristic) and quantitative (numeric). This lecture focuses on qualitative data, using blood type as the running example. The four qualitative categories are A, B, AB, and O. Raw data in a dataset like blood types is unorganized at first and may come in any order.
The speaker emphasizes that raw data are simply the original, unorganized observations, not yet summarized or arranged.
Although the example uses blood types, the key idea is how to organize qualitative data into a usable format for analysis and reporting.
Two data types in general: qualitative and quantitative. Today we primarily discuss qualitative data and its organization.
Raw Data and Data Organization
Raw data are the original observations, not yet structured for analysis.
For the blood type example, the raw dataset contains the categories A, AB, B, and O.
With small datasets you can often tell distributions by eye, but with larger datasets (e.g., thousands of observations) you need a formal organization.
The goal is to move from raw data to organized summaries (tables and graphs) that reveal patterns in the data.
Frequency Tables: Concept and Steps
A frequency table (or frequency chart) has two columns: data categories (the qualitative values) and the frequency (the count of data items in each category).
Building a frequency table by hand (illustrated): use a tally system to count occurrences of each category. Tally marks are added as you scan observations.
The process can be done by rows or by columns; the example follows counting across rows. Periodic “five-in-a-row” tallies are crossed to keep track.
After counting, the frequencies for the blood types are:
From these counts, AB is the least frequent and O is the most frequent in the sample. In many populations, blood type distribution follows a similar pattern, though exact ratios vary between populations.
A key caveat: simple counts from a sample are used to infer properties of a population, but sampling design matters for how far those inferences generalize. This motivates careful sampling to allow extrapolation.
Example Dataset: Blood Types
Data categories: A, AB, B, O.
Sample size: observations.
Frequencies:
Relative frequencies (proportions) are computed as for each category:
Percentages corresponding to the relative frequencies are obtained by multiplying by 100%:
If this sample represents a population, these relative frequencies can be used to approximate population proportions (e.g., about 36% of the population has blood type A, etc.). This illustrates how samples can be used to infer population characteristics, with the usual caveats about sampling quality and representativeness.
From Frequencies to Relative Frequencies
Notation: in practice we typically let denote the frequency of a category, and denote the sample size. The relative frequency is .
For the blood types we computed: etc.
Relative frequencies can also be expressed as percentages by multiplying by 100:
Relative frequencies provide a way to compare categories across samples of different sizes and to extrapolate to a population (with caution about sampling bias).
Visual Representations: Bar Graphs and Pareto Charts
Bar graph basics: one axis (x) represents categories, the other axis (y) represents frequency (or relative frequency). Bars can be vertical or horizontal.
In this dataset, a standard bar graph would show bars for A, AB, B, and O with heights corresponding to 18, 4, 6, and 22 respectively.
Scale: choose an evenly spaced scale on the frequency axis (e.g., increments of 2 up to the maximum frequency 22). It’s common to display the exact frequency above each bar for clarity.
Pareto chart: a special bar graph where categories are ordered from largest to smallest frequency to emphasize the most frequent categories. In this dataset, not ordered as Pareto by default, but you could reorder to inspect the largest-to-smallest pattern.
Relative-frequency bar graphs are constructed the same way, just the axis shows relative frequencies (or percentages) instead of raw counts. The visual look of the bar graph is the same; only the axis scaling differs.
Pie Charts and Angles
Pie charts represent relative frequencies as portions of a circle (360 degrees).
For a pie chart, use relative frequencies (percentages) for the angles: the angle for a category is
With our data:
For A (0.36): angle ≈
For AB (0.08): angle ≈
For B (0.12): angle ≈
For O (0.44): angle ≈
Note: Pie charts by hand require a compass and protractor, which the speaker notes are not commonly used anymore; computers make pie charts easy and precise. You can start angles anywhere and adjust colors and labeling.
Pie charts display both relative frequencies and percentages, and many tools label wedges with the category and the frequency or percent.
Time Series Data (Brief Mention)
Time series data involve observations collected over time (e.g., enrollment over semesters, yearly counts).
A time series graph has time on the horizontal axis and frequency (or another variable) on the vertical axis, with data plotted as points (or a connected line).
The course notes that time-series graphs are not the focus of this class, but they are mentioned as a related type of visualization and are covered in the textbook (2.1).
Statistical Software: Overview and Practicality
Several software options exist for performing these analyses:
Minitab: commonly used in labs; license is around .
SPSS: another widely used, often expensive license.
StatCrunch: cost-effective option for students (about per period); can be used in labs and remotely via Pearsons accounts.
The instructor emphasizes practical accessibility: StatCrunch is user-friendly and similar in workflow to SPSS/Minitab, making it a good junior-level tool for learning.
Data acquisition workflow: survey tools (e.g., Poll Everywhere, SurveyMonkey) collect data online, exportable to Excel-compatible formats, which can then be loaded into StatCrunch for analysis.
The goal is to minimize manual data entry; modern workflows emphasize online surveys and data export to processing tools.
Working with StatCrunch: Getting a Frequency Table
The workflow in StatCrunch uses two main menus: Stat and Graphs. For frequency tables, the path is: Stat -> Tables -> Frequency.
You select the data column (e.g., the blood type column) and choose statistics such as:
Frequency (counts)
Relative Frequency (proportions)
Percent (percent of total)
Cumulative Frequency
Cumulative Relative Frequency
You can compute multiple statistics at once by holding the Shift key (or the equivalent on your OS) to select multiple options.
The output displays a frequency table (counts) and can be switched to relative frequencies or percents by editing the options. This greatly simplifies the hand-calculation of the table.
In this example, the computed frequency table shows fA = 18, fAB = 4, fB = 6, fO = 22 with n = 50, and the relative frequencies 0.36, 0.08, 0.12, 0.44, respectively.
Saving results: StatCrunch results can be saved within the session, and multiple tables can be stored and retrieved later unless the session is closed. This permits building a set of notes or handouts from a single dataset.
Working with StatCrunch: Constructing Graphs
Graphs can be produced from the data and may be built to reflect the same information as the tables or to offer an alternate visualization.
Bar Graph (Bar Plot): Path is Graphs -> Bar Plot with Data. Steps:
Choose the variable (blood type) and compute. The graph will display each category with a bar height equal to the frequency (or relative frequency, if you choose that option).
You can choose between vertical or horizontal bars; the instructor prefers vertical but notes it isn’t mandatory.
To display actual values above bars, use the option Display above bar. This shows the frequency numbers (e.g., 18 above A, 4 above AB, etc.).
If you switch to a relative frequency bar graph, the heights reflect the relative frequencies (or percentages), and the axis scale remains a number line (0 to the maximum frequency or percentage).
You can also hover over bars to reveal category and value in the interactive view.
Pie Chart: Path is Graphs -> Pie Chart with Data. Steps:
Select the variable, and compute. The default pie chart shows wedges labeled with categories and their percentages or counts depending on the chosen display options.
You can adjust display options (count and/or percent total), starting angle, and colors to improve readability.
The instructor emphasizes practice: the same data can be visualized in multiple ways; the choice of chart should communicate the data clearly without distortion.
Copying to tests: when taking a test, you may need to copy or redraw the chart by hand, so you should be able to reproduce the essential shape and labels from memory or a quick sketch.
Practical Tips for Graphs and Reporting
Always ensure your graph axes are properly scaled and labeled; the axis scale should be evenly distributed to avoid misrepresenting the data.
Decide whether to order categories by the natural table order or by frequency (Pareto order) depending on what you want to emphasize.
When presenting results, consider showing both the table (numbers) and a graph (visual) to communicate the data effectively to different audiences.
For large datasets, rely on software tools (like StatCrunch) rather than hand calculations; this reduces errors and speeds up the workflow.
When using software, save your work periodically. Results persist in the session until you close the spreadsheet, but you can also save sessions for later reference.
Be mindful of software compatibility issues. The instructor notes occasional compatibility problems with Safari on Mac; Chrome or Firefox are recommended in labs, with Safari working more reliably on iPads.
Data Collection, Sampling Considerations, and Real-World Relevance
Sampling choice matters: the distributions observed in a sample are used to infer about a population. If the sample is not representative, inferences may be biased.
Blood type distributions vary across populations; A and O are often among the more common types, while AB tends to be the least common, but exact proportions differ by population group.
The practical implications include how you report results (percentages vs. counts), how you visualize differences, and how you discuss limitations of the sample in extrapolating to a broader population.
Ethical and philosophical notes: the ethical use of data includes transparency about sampling limitations and avoiding overstated generalizations. Emphasize that estimates are approximations based on the sample and that conclusions should acknowledge sampling variability and potential biases.
Quick Recap and Exam-Oriented Takeaways
For qualitative data, always start with a frequency table: categories and their counts.
Compute relative frequencies using with as the sample size. Convert to percentage if needed: .
Visualize with bar graphs (frequency or relative frequency) and pie charts (using relative frequencies). Pareto charts are useful when you want to emphasize the largest categories.
In software like StatCrunch, the essential workflow is: Stat -> Tables -> Frequency to get a frequency table, and Graphs -> Bar Plot or Pie Chart to visualize. You can select multiple statistics at once (frequency, relative frequency, percent) and display values on the chart.
For large datasets, rely on statistical software rather than manual counting, and ensure your data collection method supports meaningful population inferences.
Be mindful of data presentation: avoid skewing the interpretation with improper scales or ordering; choose representations that accurately reflect the data and support clear communication.
Browser and software caveats: prefer Chrome or Firefox for StatCrunch in labs; Safari may have occasional issues on desktop; iPad/iPhone Safari generally works fine.