Diploma in Artificial Intelligence and Machine Learning
Data Analysis and Visualization
•
Diploma
Ethics, Privacy and Data Governance
Introduction
Data analysis and visualisation are not purely technical activities. Every dataset represents decisions about whose experiences are recorded, what is considered relevant, who may access the information, how long it is retained, and how conclusions are communicated. A technically accurate analysis can still be harmful if it violates consent, exposes confidential information, reinforces discrimination, or presents a misleading visual impression.
Ethics concerns what ought to be done; privacy concerns people’s control over information about them; security concerns protection against unauthorised access or alteration; and governance concerns the structures, policies and responsibilities used to manage data throughout its life cycle. These areas overlap but are not identical. Encryption, for example, improves security but does not by itself make a data collection lawful or ethically justified.
For artificial intelligence and machine learning practitioners, responsible data handling is especially important. Models learn patterns from historical data, including social inequalities and measurement errors. A model may therefore automate unfair treatment at a scale that is difficult to detect. Ethical data analysis requires both technical competence and professional judgement.
Learning Objectives
By the end of this chapter, you should be able to:
explain consent, confidentiality, privacy, security, ownership and data retention;
distinguish personal, sensitive, confidential and anonymised data;
apply the principles of data minimisation, purpose limitation and accountability;
describe anonymisation, pseudonymisation and access-control methods;
identify governance roles and regulatory responsibilities;
recognise bias, under-representation and misleading visualisation;
design a responsible workflow for sensitive data; and
evaluate an applied data-governance decision.
1. The Data Life Cycle and Ethical Responsibility
A useful governance perspective follows data through a life cycle:
Planning: define the purpose, population, variables and risks.
Collection: obtain data lawfully, fairly and with appropriate consent.
Storage: protect data through technical and organisational controls.
Preparation: document cleaning, transformations, missing values and exclusions.
Analysis: test quality, bias, validity and potential harms.
Communication: present findings accurately and accessibly.
Sharing or deployment: control recipients, uses and downstream effects.
Retention and disposal: keep data only as long as justified and securely destroy it when no longer needed.
Ethical responsibility is distributed across this life cycle. A data analyst may not control collection or deployment, but should still identify risks and escalate them. “The database administrator gave me access” is not a sufficient justification for using information outside its authorised purpose.
Data governance life cycle showing collection, storage, analysis, communication, sharing and disposal with governance controls throughout
Figure: Data governance life cycle showing collection, storage, analysis, communication, sharing and disposal with governance controls throughout
Figure: Ethical and governance controls apply throughout the data life cycle.
2. Core Ethical Principles
Consent and lawful purpose
Consent is a voluntary, informed and specific agreement to a defined processing activity. Meaningful consent requires understandable information about what will be collected, why it is needed, who will receive it, how long it will be kept and what choices a person has. Consent should not be hidden in confusing language or obtained through pressure. Where a person cannot reasonably refuse because of a power imbalance, consent may not be an adequate ethical basis.
Consent is not unlimited. A participant who agrees to a health survey has not necessarily agreed to commercial advertising, facial-recognition training or publication of identifiable quotations. Secondary use should be assessed against the original purpose, the expectations of participants, applicable law and the risk of harm.
Confidentiality and privacy
Privacy is a person’s interest in controlling information about themselves and in being free from unjustified observation. Confidentiality is a duty to protect information entrusted in a relationship, such as between a patient and hospital. Confidentiality can continue even where information is not legally classified as personal data.
Practical measures include collecting only necessary variables, suppressing small groups, removing direct identifiers, using secure transfer channels and reporting aggregate results. Analysts should also consider indirect identification. A record containing age, postcode, occupation and rare diagnosis may identify a person even without a name.
Security
Security protects confidentiality, integrity and availability. Controls may be administrative, physical or technical:
authentication verifies identity;
authorisation determines permitted actions;
encryption protects data in transit and at rest;
backups support availability and recovery;
logging enables accountability; and
patching and vulnerability management reduce technical exposure.
Security is risk-based. Highly sensitive data require stronger controls than a public statistical report. Security also includes staff training, incident response and secure disposal, not merely a password.
Ownership, stewardship and intellectual property
The person who supplies data is not always the legal owner, and ownership rules differ by jurisdiction and contract. A company may own a database while individuals retain privacy rights over records about them. Publicly available data are not automatically free of ethical restrictions. Web scraping can violate terms of service, reveal personal information or create an unfair secondary use.
The concept of data stewardship is often more useful than simple ownership. A steward manages data on behalf of an organisation or community and must preserve quality, lawful use, provenance and public trust. Contracts should specify permitted uses, access, intellectual property, deletion, breach notification and responsibilities of third parties.
Retention and disposal
Retention should be justified by operational, legal, research or archival need. Keeping data “just in case” increases breach impact and the possibility of future misuse. A retention schedule should identify the record type, retention period, responsible owner, review date and disposal method. Disposal must address copies, backups, exports and paper records. Secure deletion may require cryptographic erasure, verified overwriting or physical destruction, depending on the medium and risk.
3. Data Classification and De-identification
A practical classification scheme may include:
Category
Example
Typical control
Public
Published annual totals
Integrity checks and version control
Internal
Operational dashboard
Staff authentication and role restrictions
Confidential
Supplier contract or identifiable employee file
Restricted access, logging and secure storage
Sensitive personal
Health, biometric, financial or precise location data
Strong justification, encryption, minimisation and enhanced monitoring
Classification is contextual. A single data point may be harmless in isolation but sensitive when combined with other data.
Pseudonymisation replaces identifiers with codes while a separate key permits re-identification. It reduces casual exposure but remains personal data if re-identification is reasonably possible. Anonymisation aims to make identification irreversible or sufficiently infeasible in the relevant context. No technique guarantees anonymity against every future dataset or attacker.
Common techniques include:
removal of direct identifiers such as names and account numbers;
generalisation, such as reporting age bands rather than exact age;
suppression of rare records or small cells;
aggregation of locations and categories;
perturbation or noise addition; and
controlled access to detailed data rather than public release.
Anonymisation involves a trade-off: more privacy protection can reduce analytical utility. A release should be tested against reasonable linkage attacks, including use of publicly available information. A dataset containing unique combinations can remain identifiable even after names are removed.
4. Access Control and Accountability
Access should follow least privilege: each user receives only the access necessary for an authorised task and only for the required duration. Role-based access control assigns permissions to roles such as analyst, clinician, manager or auditor rather than individually assigning every permission. Attribute-based access control can additionally consider project, location, device, time or data sensitivity.
A sound access process includes identity verification, multi-factor authentication for higher-risk systems, approval by a data owner, periodic review, rapid removal of departed users, and logs that record access and changes. Shared accounts weaken accountability and should normally be prohibited.
Governance roles commonly include:
Data subject: the person to whom personal data relate.
Data owner or controller: determines purpose and means of processing, subject to jurisdictional terminology.
Data steward: maintains quality, definitions, metadata and responsible operational use.
Data processor: processes data on behalf of another organisation.
Data protection or privacy officer: advises on compliance, risk and rights.
Security officer: manages technical and organisational protection.
Analyst or model developer: performs analysis and documents methods, limitations and risks.
Ethics or review committee: evaluates research or high-risk use cases.
Responsibility cannot be delegated away merely by outsourcing processing. Contracts and oversight must ensure that vendors follow approved purposes and controls.
5. Regulatory and Professional Obligations
Regulatory obligations vary by jurisdiction, sector and type of data. Common legal principles include lawfulness, fairness, transparency, purpose limitation, data minimisation, accuracy, storage limitation, security and accountability. Some frameworks provide rights of access, correction, deletion, objection or restriction. Sector-specific regimes may impose additional duties for health, education, finance, children’s data or critical infrastructure.
A responsible analyst should not assume that a familiar regulation applies everywhere. Before processing data, identify the jurisdiction, organisation, data categories, cross-border transfers, contractual terms and applicable sector rules. Seek advice from a privacy or legal specialist when the processing is high-risk or uncertain.
A privacy impact assessment or data protection impact assessment is a structured evaluation of purpose, necessity, affected people, risks, safeguards and residual risk. It is particularly appropriate for large-scale monitoring, sensitive data, profiling, biometrics, vulnerable groups and automated decisions.
Professional obligations also matter where legislation is silent. Codes of conduct commonly require competence, honesty, respect for persons, avoidance of harm, protection of confidentiality and disclosure of limitations. Compliance is a minimum standard, not proof that a project is ethically acceptable.
6. Fairness, Representation and Bias
Bias is systematic distortion that produces inaccurate, inequitable or unjust outcomes. It can enter through:
Sampling bias: the collected sample does not represent the target population.
Measurement bias: variables are recorded differently across groups or do not measure the intended concept.
Historical bias: past inequalities are reflected in the labels or outcomes.
Selection bias: records are included only after a prior decision, such as who received a loan.
Processing bias: cleaning, imputation or model design affects groups differently.
Reporting bias: some events are more likely to be recorded or reported.
Deployment bias: a system is used in conditions different from those assumed during development.
Representation is not solved merely by adding more records. Analysts should ask whether groups are present in sufficient numbers, whether variables have equivalent meaning across groups, whether missingness differs, and whether the target outcome itself is fair to use.
Fairness definitions can conflict. For example, equal selection rates, equal error rates and equal positive predictive values may not all be achievable simultaneously when groups have different base rates. Therefore, fairness requires a justified choice of relevant harms and stakeholders, not a mechanical search for one universal metric.
Useful checks include disaggregated descriptive statistics, missingness comparisons, error rates by group, subgroup visualisations, intersectional analysis and qualitative consultation. Small subgroup results should be interpreted cautiously because uncertainty may be high and disclosure risk may increase.
7. Ethics of Visualisation
A visualisation is an argument, not a neutral decoration. Ethical visualisation requires faithful representation of the data and honest communication of uncertainty.
Important practices include:
start axes at zero for bar charts when comparing magnitudes, unless a clearly labelled alternative is justified;
avoid truncated axes that exaggerate small differences;
use equal intervals and proportional areas;
label units, dates, denominators and data sources;
distinguish counts from rates and percentages from percentage points;
show missing data rather than silently treating them as zero;
avoid unnecessary three-dimensional effects and distorted pictograms;
use colour schemes accessible to people with colour-vision deficiency;
avoid red–green dependence where possible;
show uncertainty intervals or caveats where estimates are uncertain; and
protect confidentiality through aggregation and suppression.
A rate requires a meaningful denominator. Comparing 20 incidents in a population of 100 with 30 incidents in a population of 10,000 using counts alone would be misleading. Likewise, a dramatic percentage increase from a very small baseline may have limited practical significance.
Visual hierarchy can also manipulate attention. Enlarging one series, selecting a convenient date range or omitting inconvenient categories may create a false narrative without altering any individual data point. Ethical reporting therefore includes methodological notes, alternative views where relevant and a clear distinction between observation, interpretation and recommendation.
8. Responsible Workflow for Sensitive Data
A practical workflow is as follows:
Define the decision and purpose. State what decision the analysis supports and what uses are prohibited.
Map the data. Record sources, fields, sensitivity, subjects, transfers, owners and retention needs.
Assess necessity and proportionality. Remove variables that are not needed; consider whether less intrusive data could answer the question.
Select safeguards. Use minimisation, pseudonymisation, access controls, encryption, aggregation, testing and documentation.
Check quality and representation. Examine missingness, sampling, measurement validity and subgroup performance.
Review and approve. Involve the data owner, privacy specialist, security staff and relevant community or ethics reviewers.
Analyse and document. Preserve provenance, assumptions, transformations, exclusions, code versions and limitations.
Communicate responsibly. Present accurate charts, uncertainty, limitations and appropriate levels of detail.
Monitor and close. Audit use, respond to incidents, review continued necessity and securely dispose of data.
This workflow is iterative. A new variable, vendor, model use or visualisation may create a new risk assessment requirement.
9. Illustrative Case: Student Support Prediction
Background
A college proposes a model to identify students who may need academic support. It combines attendance, assessment performance, learning-platform activity and demographic information.
Problem
The proposed dashboard displays individual risk scores to lecturers. Historical records show that mature students and students with limited internet access have less platform activity, while some groups are under-recorded in attendance data. The college has not clearly informed students that their data will be used for prediction.
Analysis
The purpose—offering voluntary support—may be beneficial, but several risks exist. Platform activity is an imperfect proxy for engagement. Demographic variables may reproduce historical disadvantage. A risk score could become a label that lowers expectations or triggers disciplinary action. Individual display increases confidentiality risk, and students may not know how to challenge an inaccurate result.
Approach and solution
The college should define the model as a support aid, not an automatic decision-maker. It should consult students and staff, publish a clear explanation, identify a lawful and ethical basis, and minimise inputs. Sensitive attributes may be used in controlled fairness testing without being exposed to lecturers. The model should be evaluated by relevant subgroups, with human review and a documented appeal process.
Access should be role-based: lecturers see only students they support, analysts see pseudonymised records, and a small authorised team holds the re-identification key. Scores should be accompanied by uncertainty and explanations, and interventions should be supportive rather than punitive. The college should monitor false positives, false negatives and unequal outcomes, audit vendor processing, establish a retention period and delete data when no longer needed.
Outcome
The college may proceed only if the assessment demonstrates acceptable residual risk and meaningful safeguards. If the model cannot distinguish lack of platform activity from lack of engagement, a simpler adviser-led process may be more valid and less intrusive.
Learning points
The case illustrates that technical predictive performance is not enough. Purpose limitation, representation, explainability, proportionality, access control, human oversight and the right to challenge are all necessary for responsible deployment.
10. Contemporary Developments and Limitations
Generative AI increases governance challenges because training data may contain personal information, copyrighted material, confidential documents or biased representations. Sensitive information should not be entered into a public model without authorisation. Organisations should define approved tools, prohibit confidential prompts where necessary, review outputs, record provenance and ensure human accountability.
Synthetic data can reduce direct exposure but is not automatically anonymous. It may reproduce sensitive patterns, permit inference about source records or fail to represent minority groups. Privacy-enhancing technologies—including secure multiparty computation, differential privacy, federated learning and trusted execution environments—can reduce exposure in appropriate settings, but they introduce implementation complexity and possible loss of accuracy or interpretability.
No governance system eliminates risk. Policies may be ignored, classifications may be wrong, access logs may not be reviewed, and legal compliance may lag behind technology. Effective governance therefore combines proportionate controls, continuous monitoring, stakeholder participation, technical testing and a culture in which staff can report concerns without retaliation.
Best-Practice Checklist
Before releasing or using an analytical dataset, ask:
Is the purpose specific, legitimate and understandable?
Were people informed, and is consent appropriate where required?
Is every variable necessary?
Could individuals be identified directly or through linkage?
Are permissions, retention and vendor responsibilities documented?
Are access, encryption, logging and incident procedures proportionate?
Are populations and relevant subgroups represented?
Have measurement error, missingness and fairness been assessed?
Does the visualisation show denominators, uncertainty and limitations?
Can affected people obtain an explanation, correction or review?
Is there a defined end date and secure disposal process?
Chapter Summary
Ethical data analysis requires more than accurate computation. Consent and purpose limitation establish why data may be collected and used; privacy and confidentiality protect people from unjustified exposure; security protects confidentiality, integrity and availability; and retention rules limit unnecessary accumulation. Ownership is often less important than stewardship, accountability and clearly defined rights.
Anonymisation and pseudonymisation reduce risk but have different meanings and limitations. Least-privilege access, role-based permissions, authentication, encryption, logging and review provide practical governance controls. Regulations differ by jurisdiction, so analysts must identify applicable legal and sector obligations and seek specialist advice for high-risk processing.
Fairness depends on representation, measurement quality, historical context and the harms chosen for evaluation. Visualisations must communicate scale, uncertainty, denominators and missingness honestly. A responsible workflow maps the data life cycle, assesses necessity and risk, applies safeguards, evaluates subgroup effects, documents decisions, involves stakeholders and monitors outcomes. In AI and machine learning, human oversight and the ability to challenge decisions are essential because models can amplify existing inequalities.
Key Terms
Consent: Voluntary, informed and specific agreement to a defined use of data.
Confidentiality: Duty to protect information entrusted within a relationship or role.
Privacy: Individual interest in control over personal information and freedom from unjustified intrusion.
Security: Protection of data confidentiality, integrity and availability.
Data governance: Structures, policies, roles and processes for responsible data management.
Data steward: Person responsible for data quality, definitions, provenance and appropriate operational use.
Data owner/controller: Entity determining the purpose and means of processing.
Data processor: Entity processing data on behalf of another organisation.
Personal data: Information relating to an identified or reasonably identifiable person.
Sensitive data: Personal information requiring enhanced protection because disclosure or misuse may cause significant harm.
Pseudonymisation: Replacing identifiers with codes while retaining a possible re-identification key.
Anonymisation: Processing intended to make identification irreversible or sufficiently infeasible.
Data minimisation: Collecting and using only data necessary for a stated purpose.
Purpose limitation: Restricting use to specified, legitimate and compatible purposes.
Least privilege: Granting only the access necessary for an authorised task.
Retention schedule: Documented rules for review, preservation and disposal of data.
Sampling bias: Systematic difference between the collected sample and target population.
Measurement bias: Systematic error in how a variable is defined or recorded.
Fairness: Just and appropriately justified treatment of individuals or groups.
Privacy impact assessment: Structured examination of processing necessity, risks and safeguards.
Review Questions
Short Answer Questions
Distinguish privacy, confidentiality and security.
Why is pseudonymisation not equivalent to anonymisation?
State two advantages of least-privilege access control.
What is data minimisation, and why does it reduce risk?
Give two ways a visualisation can mislead an audience.
Long Answer Questions
Explain the ethical responsibilities that arise at each stage of the data life cycle.
Compare consent, purpose limitation and data minimisation in a sensitive-data project.
Describe a governance structure involving a data owner, steward, analyst, processor and privacy officer.
Explain how sampling, measurement and historical bias can affect an AI model.
Discuss the relationship between regulatory compliance and professional ethical responsibility.
Analytical / Application Questions
A hospital wants to publish a table containing age, suburb, diagnosis and treatment outcome. Design a risk assessment and recommend appropriate transformations or access restrictions.
A dashboard shows a sharp increase in incidents after a policy change. Explain how you would test whether the increase reflects a real change, a denominator effect, reporting changes or a misleading visual scale.
An institution proposes using learning-platform activity to identify students at risk. Evaluate the proposal using proportionality, representation, fairness, confidentiality, human oversight and retention criteria.
Multiple Choice Questions with Answers
Question 1
Which principle requires an organisation to collect only the data needed for a stated purpose?
A. Data minimisation
B. Data portability
C. Open access
D. Unlimited retention
Correct Answer: A. Data minimisation
Question 2
What is the main difference between pseudonymisation and anonymisation?
A. Pseudonymisation always publishes data openly
B. Pseudonymisation retains a possible route to re-identification
C. Anonymisation requires collecting more identifiers
D. Anonymisation is a type of encryption only
Correct Answer: B. Pseudonymisation retains a possible route to re-identification
Question 3
Which control best implements least privilege?
A. Giving all employees administrator access
B. Using one shared account for analysts
C. Granting each user only the permissions required for the task
D. Removing all access logs
Correct Answer: C. Granting each user only the permissions required for the task
Question 4
Why can removing names fail to protect privacy?
A. Names are never personal data
B. Indirect combinations of variables may identify a person
C. Removing names increases data accuracy
D. Charts automatically reveal every record
Correct Answer: B. Indirect combinations of variables may identify a person
Question 5
Which is an example of measurement bias?
A. A sample contains equal numbers from every group
B. A sensor records one group’s outcomes systematically differently
C. A dataset is encrypted at rest
D. A report includes a source citation
Correct Answer: B. A sensor records one group’s outcomes systematically differently
Question 6
What should a responsible visualisation normally provide when estimates are uncertain?
A. Uncertainty information or suitable caveats
B. A three-dimensional effect
C. An unexplained truncated axis
D. Only the largest observed value
Correct Answer: A. Uncertainty information or suitable caveats
Question 7
Who generally determines the purposes and means of processing in a governance arrangement?
A. The data subject alone
B. The data owner or controller
C. Any external viewer
D. The chart designer only
Correct Answer: B. The data owner or controller
Question 8
Which statement about consent is correct?
A. Consent for one purpose automatically covers every future use
B. Consent should be informed, specific and voluntary
C. Consent removes the need for security
D. Consent is valid only when information is public
Correct Answer: B. Consent should be informed, specific and voluntary
Question 9
What is a major risk of retaining data indefinitely?
A. It guarantees perfect accuracy
B. It eliminates the need for governance
C. It increases exposure to breaches and future misuse
D. It makes anonymisation unnecessary
Correct Answer: C. It increases exposure to breaches and future misuse
Question 10
In the student-support case, what is the most responsible use of a risk score?
A. Automatic punishment for every high score
B. A confidential support aid with human review and appeal
C. Publication of individual scores
D. Permanent retention without student information
Correct Answer: B. A confidential support aid with human review and appeal