S

Course Logistics and Tooling Setup

  • Prerequisites and Environment Setup:

    • Software Requirements: Use the desktop version of Excel for Microsoft 365. Both Windows and macOS environments are supported for working with PivotTables.

    • Code Editing: A plain-text editor (such as Visual Studio Code) must be available for future programming modules.

    • Course Content Management: Lab instructions and submission details are located in the designated labs folder on OWL. Completed lab work must be checked by the instructor prior to departure.

  • Schedule of Activities (2026):

    • 22 September: Data preparation review and Excel II.

    • 29 September: Excel III.

    • 6 October: Quiz 1 and Programming I.

    • 13 October: Reading Week (no class scheduled).

    • Administrative Updates: Official schedule changes and course material updates are published on Brightspace and the course outline.

Course Schedule Table
  • Jupyter Notebook Setup Guidelines:

    • Installation Reference URL: https://jupyter.readthedocs.io/en/latest/install.html

    • Environment Options: Jupyter Notebooks, Anaconda distribution, or Visual Studio Code (VSCode).

    • macOS Setup: Configuration can be performed via the terminal or within VSCode.

    • Windows Setup: Windows Subsystem for Linux (WSL) is recommended for native Linux tools, though VSCode provides a more streamlined installation path.

    • Implementation Timeline: Environment setup instructions will be provided prior to the start of Programming I following Quiz 1.

Data Preparation and Regular Expression Analysis

  • Data Preparation Lifecycle:

    • Data Pipeline Flow: Web page →\rightarrow Raw records →\rightarrow Clean table →\rightarrow Analysis.

    • Structural Integrity: At every phase of data transformation, explicitly verify what a single row represents to ensure observational granular clarity.

Data Preparation Flow Diagram
  • Regular Expression Syntax and Evaluation:

    • . (Dot): Matches any single character except a newline character by default.

    • * (Asterisk): Matches zero or more occurrences of the preceding element.

    • (...) (Parentheses): Defines a capture group.

    • \1 (Backreference): Matches the exact text previously captured by capture group 1.

Regex Pattern Table
  • Pattern Evaluation Case Study: (...).*\1

    • Target Objective: Identify string tokens that contain a repeated sequence of three characters.

    • Word Analysis Results:

    • barbary: Captures bar in group 1; matching repeated segment found (Match=Yes\text{Match} = \text{Yes}).

    • gummage: No repeated 3-character group found (Match=No\text{Match} = \text{No}).

    • entablement: Captures ent in group 1; matching repeated segment found (Match=Yes\text{Match} = \text{Yes}).

    • mathematic: Captures mat in group 1; matching repeated segment found (Match=Yes\text{Match} = \text{Yes}).

    • corundum: No repeated 3-character group found (Match=No\text{Match} = \text{No}).

    • Key Requirement: The backreferenced back-token must be an exact literal duplicate of the captured string sequence.

Regex Answers Table

Generative Artificial Intelligence in Spreadsheet Workflows

  • AI Assistant Capabilities:

    • Formula Suggestion: Proposes dynamic worksheet formulas based on context.

    • Content Manipulation: Direct editing and structural modification of workbook elements.

    • Automated Summaries: Synthesis of data, chart generation, and automated PivotTable creation.

    • Deployment Constraints: Functionality access depends on software version, licensing level, and organizational security policy.

  • Human-in-the-Loop Review Pipeline:

    • Operational Flow: Business question →\rightarrow Draft calculation →\rightarrow Independent check →\rightarrow Approved result.

Human Review in AI Workflow
  • Human Verification Protocols:

    • Unit and Metric Validation: Ensure output units match physical or financial reality.

    • Boundary and Range Inspection: Check applied filters, row boundaries, and explicitly referenced cell blocks.

    • Total Reconciliation: Verify underlying math against independent aggregated calculations.

  • Common AI Pitfalls:

    • Aggregation Pitfall Example: When prompted for "Average sales per order", AI systems frequently average existing regional averages rather than dividing total overall revenue by total order count.

    • Corrective Procedure: Inspect denominators directly and compare results against total sales divided by total order count.

  • Evolving Responsibilities of Analytics Professionals:

    • Shift in Effort: Less time spent manually constructing routine formulas; significantly more time allocated to data definitions, conceptual modeling, and verification.

    • Data Governance: Confidential and sensitive enterprise data must be processed exclusively through authorized and secured compliance workflows.

Fundamentals of Spreadsheet Architecture

  • Structural Overview:

    • Grid Structure: Worksheets organize data into horizontal rows and vertical columns of individual cells.

    • Cell Storage Types: Cells hold raw text, numeric parameters, or dynamic formulas.

    • Functional Purpose: Formulas create functional dependencies that connect explicit input data to dynamically updated output results.

Spreadsheet Fundamental Ideas Table
  • Cell Contents vs. Visual Display:

    • Stored Value: The exact numerical value stored in memory (e.g., 0.150.15 or 1234.51234.5).

    • Displayed Value: The rendered value following visual formatting rules (e.g., 15%15\% or CAD 1,234.50\text{CAD } 1,234.50).

    • Formatting Scope: Formatting changes font, background color, cell borders, and number display without altering underlying precision or memory value.

Cell Contents and Appearance Table
  • Data Types and Structural Pitfalls:

    • Text: String identifiers (e.g., Order S001). Common Pitfall: Storing numeric values as text, which prevents mathematical aggregation.

    • Number: Numeric values (e.g., 1,8001,800). Common Pitfall: Hardcoding currency symbols directly inside the cell as text.

    • Date: Temporal values (e.g., 2026-01-05). Common Pitfall: Day/month ordering ambiguity across regional settings.

    • Logical: Boolean values (TRUE or FALSE). Common Pitfall: Treating string literal "TRUE" as equivalent to Boolean TRUE.

    • Core Rule: Standardize data types consistently within individual data columns.

Types of Cell Data Table
  • Cell Coordinate Reference System:

    • Columns: Identified by alphabetical characters (e.g., Column B, Column AA).

    • Rows: Identified by sequential numerical integers increasing downwards (e.g., Row 4, Row 99).

    • Cell Address: Combination of column letter and row index (e.g., B4 represents Column B, Row 4; AA99 represents Column AA, Row 99).

    • Rectangular Ranges: Defined by top-left cell and bottom-right cell separated by a colon (e.g., B2:E10 encompasses all cells in the rectangle from B2 through E10).

Coordinates Reference Table
  • Multi-Cell Range Operations:

    • Grid Range Evaluation Example: B2:D4 encompasses a 3x3 matrix containing 9 total cells (Row 2: 10,20,3010, 20, 30; Row 3: 40,50,6040, 50, 60; Row 4: 70,80,9070, 80, 90).

    • Sum Aggregation: =SUM(B2:D4) evaluates to 10+20+30+40+50+60+70+80+90=45010 + 20 + 30 + 40 + 50 + 60 + 70 + 80 + 90 = 450.

Ranges Grid Example
  • Formula Structure and Dynamic Dependencies:

    • Initialization: Formulas must begin with an equals sign (=).

    • Formula Components: Composed of constant values, cell references, standard mathematical operators, contiguous ranges, and built-in functions.

    • Dependency Chain Example: Units stored in B2 (2020), Price stored in C2 ($\text{CAD } 9090). Revenue calculated in D2 via =B2*C2 (CAD 1,800\text{CAD } 1,800). Updating any input cell automatically updates all dependent output cells.

Formula Dependencies Diagram
  • Number Formatting Rules:

    • Stored 0.1560.156 formatted as Percentage (1 decimal place) displays as 15.6%15.6\%.

    • Stored 1234.51234.5 formatted as Number (2 decimal places) displays as 1,234.501,234.50.

    • Stored 1234.51234.5 formatted as Currency (CAD) displays as CAD 1,234.50\text{CAD } 1,234.50.

    • Stored 0.1560.156 formatted as Number (2 decimal places) displays as 0.160.16.

    • Operational Rule: Formatting rounds the visual presentation only; stored precision remains unrounded for calculations.

  • Troubleshooting Cell Formatting:

    • Column Width Errors (####): Occurs when column width is insufficient to render the formatted string; resolve by increasing column width.

    • Long Numeric Text Identifiers: Must be explicitly formatted as Text prior to string entry to prevent scientific notation conversion or loss of leading zeros.

    • Value Verification: Always verify raw values for dates and percentages in the formula bar.

  • Cut, Copy, and Paste Operations:

    • Windows Shortcuts: Copy (Ctrl+C), Paste (Ctrl+V), Cut (Ctrl+X), Paste Special (Home > Paste).

    • macOS Shortcuts: Copy (Command+C), Paste (Command+V), Cut (Command+X), Paste Special (Home > Paste).

    • Paste Special Mechanics: Explicitly select whether to paste values, formulas, or formatting properties.

Cell Referencing Mechanics

  • Reference Types Overview:

    • Relative Reference (B4): Neither row nor column fixed. Shifts relative to copy destination.

    • Mixed Column Fixed Reference ($B4): Column B fixed; row shifts relatively.

    • Mixed Row Fixed Reference (B$4): Column shifts relatively; row 4 fixed.

    • Absolute Reference ($B$4): Both column B and row 4 fixed.

    • Range Locking: Absolute dollar signs apply to range bounds as well (e.g., $A$1:H$2).

  • Comparative Referencing Behavior (Origin Cell D6 copied to Destination E5):

    • Destination offset: Move 1 column right (D→E\text{D} \rightarrow \text{E}), 1 row up (Row 6→Row 5\text{Row } 6 \rightarrow \text{Row } 5).

    • Relative Formula =B4 in D6: Becomes =C3 in E5 (points to cell C3).

    • Fixed Column Formula =B4</code>in<code>D6</code>:Becomes<code>=B4</code> in <code>D6</code>: Becomes <code>=B3 in E5 (points to cell B3).

    • Fixed Row Formula =B$4 in D6: Becomes =C$4 in E5 (points to cell C4).

    • Absolute Formula =$B$4 in D6: Remains =$B$4 in E5 (points to cell B4).

  • Currency Exchange Conversion Model:

    • Conversion Formula: =A14*$B$11

    • Operational Role: A14 stores a variable foreign currency value (e.g., USD); $B$11 stores a fixed exchange conversion factor (CAD per USD 11). Fixing $B$11 allows downward formula copying across multiple transaction rows.

  • Named Ranges and Named Cells:

    • Single Cell Naming: Select single cell, type custom name (e.g., ExchangeRate) in Name Box. Formulas use literal names: =A14*ExchangeRate.

    • Range Naming: Select continuous array, enter custom name (e.g., Revenue) in Name Box. Use directly in aggregation functions: =SUM(Revenue).

Formula Operators, Syntax, and Hierarchy

  • Operator Classification:

    • Arithmetic Operators: +, -, *, /, %, ^. Example: =2^3 evaluates to 88.

    • Comparison Operators: =, >, <, >=, <=, <>. Example: =B2>=20 evaluates to Boolean TRUE or FALSE.

    • Text Concatenation Operator: &. Example: ="Wednes"&"day" evaluates to string "Wednesday".

  • Precedence Hierarchy and Parentheses:

    • Evaluation Order: Parentheses →\rightarrow Exponents →\rightarrow Multiplication and Division →\rightarrow Addition and Subtraction.

    • Order Impact Example: =10+2*3 evaluates to 10+6=1610 + 6 = 16; =(10+2)*3 evaluates to 12×3=3612 \times 3 = 36.

  • Reference Operators:

    • Range Operator (:): References all cells between two endpoints inclusive. Example: =SUM(B5:B15).

    • Union Operator (,): Combines multiple distinct references. Example: =SUM(B5:B15,C5:C14).

    • Intersection Operator ( space character): Identifies overlapping cells common to both ranges. Example: =SUM(B5:B15 B6:B16) evaluates exclusively over range B6:B15.

  • Cross-Worksheet External Referencing:

    • Syntax Structure: ='SheetName'!CellAddress

    • Example: ='Formula Practice'!B11 or =Merch!A3.

    • Quotation Rule: Worksheet names containing spaces or non-alphanumeric characters must be wrapped in single quotation marks.

Statistical, Financial, and Logical Functions

  • Statistical Summary Functions:

    • AVERAGE: Computes arithmetic mean of numeric cells.

    • COUNT: Counts cells containing numeric entries.

    • MIN / MAX: Identifies lowest and highest numeric values in a dataset.

    • CORREL: Calculates Pearson linear correlation coefficient between two aligned equal-sized ranges.

    • STDEV.S / STDEV.P: Calculates sample standard deviation (STDEV.S\text{STDEV.S}) and population standard deviation (STDEV.P\text{STDEV.P}).

    • RANK.EQ: Returns relative rank of a value within an array; ties share top rank.

    • PERCENTILE.INC: Returns kk-th percentile of values inclusive of bounds 00 and 11.

    • Legacy Compatibility Note: RANK, PERCENTILE, and STDEV represent older compatibility functions.

  • Statistical Function Calculation Check (Dataset: 10,40,20,3010, 40, 20, 30):

    • =SUM(10, 40, 20, 30) evaluates to 100100.

    • =AVERAGE(10, 40, 20, 30) evaluates to 2525.

    • =STDEV.S(10, 40, 20, 30) evaluates to 12.909912.9099.

    • =MIN(10, 40, 20, 30) evaluates to 1010.

    • =RANK.EQ(10, (10, 40, 20, 30), 0) (descending order) evaluates to rank 44.

  • Financial Valuation Functions:

    • PV / FV: Computes Present Value and Future Value.

    • NPV: Calculates Net Present Value of periodic stream of future cash flows at a specified discount rate.

    • DB: Computes asset depreciation using fixed declining-balance method.

    • IPMT: Computes interest payment portion of an installment loan.

    • Alignment Constraint: Discount rate period must strictly match payment cash flow frequency.

  • Financial Calculation Examples:

    • Future Value: =FV(5%, 3, 0, -1000) models investing CAD 1,000\text{CAD } 1,000 for 33 annual periods at 5%5\% interest with zero additional payments. Output evaluates to CAD 1,157.63\text{CAD } 1,157.63.

    • Net Present Value: =NPV(10%, 400, 400, 400) - 1000 models initial cash outflow of CAD 1,000\text{CAD } 1,000 today followed by CAD 400\text{CAD } 400 cash inflows at the end of years 1, 2, and 3 discounted at 10%10\%. Output evaluates to approximately CAD −5.26\text{CAD } -5.26.

  • Boolean Logic and Conditional Operations:

    • Truth Tables:

    • AND(A, B): Returns TRUE if and only if both conditions evaluate to TRUE.

    • OR(A, B): Returns TRUE if at least one condition evaluates to TRUE.

    • NOT(A): Inverts logical boolean input. Example: =NOT(B2>20) is logically identical to =B2<=20.

    • Single Condition Branching (IF):

    • Syntax: =IF(logical_test, value_if_true, value_if_false)

    • Example: `=IF(B2>=20,