Wednesday, July 31, 2013

Mapping changes over time

A fellow courserian mapped the decline of Monarch butterflies and it had several elements:
  1. An external data source (in this case: Flickr) with geocoding
    1. Photos are geotagged
  2. A time line
    1. 2008 to 2013
  3. Good visualization 
    • a heat map was used
  4. A basemap
    • Imagery was used I believe
If I'm running a hospital network and I have information such as aggregate patient location, I would be interested in seeing where patients are coming from i.e.

  1. An internal data source with geocoding
    • patients are located say via postal code
  2. A timeline
    • last 5 years
  3. Good visualization
    • a choropleth, or graduated circles
    • or a heat map
  4. A basemap 
    • Either imagery or split by postal code or natural subdistrict

Monday, July 29, 2013

Beyond Model Thinking

 Next steps beyond model thinking
  • Figure out entropy 
  • Checkout - http://www.complexityexplorer.org/

Saturday, July 27, 2013

Networks

Networks

Lectures cover:
  • Logic
    • what rules or organizations use to form connections?
    • how it forms
  • Structure
    • what are the measures to compare networks?
    • measures
  • Function
    • what properties emerges from the structure?
    • what it does

Network Structure

  • A set of nodes and edges
    • edges can be undirected or directed
  • Degree
    • how many edges each node has on average
    • node
      • number of edges attached to a node
    • network
      • average degree of all nodes
      • = 2 x Edges / Nodes
    • neighbours of a node
      • all other nodes connected by an edge to the node
    • Theorem
      • The average degree of neighbours of nodes will be at least as large as the average degree of the network
      • i.e. Most people's friends are more popular than they are!
  • Path Length
    • definition
      • Minimal number of edges that must be traversed to go from node A to node B
    • Average Path Length
      • Average path length between all pairs of nodes in a network
    • how far it is from each node to another node
  • Connectedness
    • whether the entire graph is connected to itself
    • definition
      • A graph is connected if you can get from one node to any other
  • Clustering Coefficient
    • how tightly clustered are the edges
    • definition
      • percentage of triples of nodes that have edges between all three nodes
  • What each measure tells us
    • Degree
      • Density of connections
      • Social Capital
        • A proxy for social capital
      • Speed of Diffusion 
        • How quickly information spreads
    • Path Length
      • # Flights Needed
      • Social Distance
      • Likelihood of information spreading
        • unlikely to spread if path length is long
    • Connectedness
      • Markov Process - an essential precondition
      • Terrorist Group Capabilities
        • Connected groups are more capable
      • Internet/Power Failure
      • Information Isolation
        • Disconnected people may not learn things
    • Clustering Coefficient
      • Redundancy/Robustness
        • If there is a break, the network still works
      • Social Capital
      • Innovation adoption (triangles)
        • How likely an innovation is likely adopted
  • Picture = 1000 words

Network Logic

  • Random attachment
    • Connection procedure
      • N nodes
      • P probability two nodes connected
    • Contextual Tipping Point
      • For large N, the network almost always becomes connected when P > 1/(N-1)
  • Small Worlds
    • People have some percentage of "local" or "clique" friends and some percentage of random friends
    • As people have more random friends, there's less clustering an shorter average path length
  • Preferential Attachment
    • Connection procedure:
      • Node Arrives
      • Probability connects to an existing node is proportional to the node's degree
    • The degree distribution always results in a long tail
      • A lot of nodes only have degree 1
      • A handful of nodes with very high degree
    • Results
      • The exact network we get is path dependent
      • The equilibrium degree distribution is not path dependent
        • Always a long tail degree distribution

Network Function

  • Micro decisions/processes when forming networks aggregates in emergent network properties
  • Six Degrees
    • Stanley Milgram & Duncan Watts
    • Random Clique Network
      • Formation Rules: Each person has
        • C clique friends
        • R random friends
      • K-Neighbour
        • All nodes that are of path length K to a node but not of any shorter path length
      • Strength of weak ties

Path Dependence

Path Dependence

Lectures cover:
  • What is Path Dependence?
  • Construct Urn Models to understand
    • different types of path dependence
    • what causes path dependence
    • difference between path dependent outcomes and path dependent equilibria
  • Examples of Urn Models
    • Polya Process, Balancing Process,
  • Path dependencies is logically different from increasing returns
  • Path dependencies are caused by externalities i.e. interdependencies between choices/decisions
    • externalities with negative effects are more likely to be path dependent
  • Compare path dependence and Markov Processes, Tipping Points and Chaos
  • Key lessons - my own reflection of what this lecture means
Real-world examples:
  • QWERTY typewriter keyboard
    • increasing returns / virtuous cycle
      • the more QWERTYs lead to more QWERTYs
  • Technology
    • AC vs DC
    • Gasoline vs Electric Cars
  • Common Law
    • Influence of Precedent
  • Institutional Choices
    • Defined benefits
  • Economic Success
    • Ann Arbor vs Jackson
  • Manifest Destiny of America
  • Railroads 
 

Path Dependence

  • Path Dependent
    • Outcome probabilities depend upon the sequence of path outcomes.
      • Doesn't necessarily determine, merely affects the probabilities
    • What happens now depends on what happened along the path to get here
  • Phat Dependent
    • Outcome probabilities depend upon past outcomes outcomes but not their order
      • Polya process is Phat

Urn Models

  • Basic Urn Model
    • Urn contains balls of various colors
    • The outcome equals the color of the ball selected
  • Bernoulli Model
    • Fixed number of balls in the urn
    • U = {B blue, R red}     ; U stands for Urn is a set of B blue and R red
    • Process: Select ball and return to the urn
    • P(red) = R/(B+R)
    • Outcomes independent
  • Polya Process
    • U = {1 Blue, 1 Red}
    • Process: 
      • Select and return
      • Add a new ball that is the same color as the ball selected
    • Probabilities will change over time
    • Result
      • Any probability of red balls is an equilibrium and equally likely
      • Any history of B blue and R red balls is equally likely
        • Seeing just the set in the outcome doesn't tell you anything about the order (a Phat process) because any order is equally likely
    • Example:
      • Fashion: People buy leopard prints because there are more leopard prints
      • Technology: People buy iPhones because they see iPhones
  • Balancing Process
    • U = {1 Blue, 1 Red}
    • Process:
      • Select and return
      • Add a new ball that is the opposite color as the ball selected
    • Result
      • The balancing process converges to equal percentages of the two colors of balls
    •  Examples
      • Need to keep constituencies happy
        • Selection of site for political conventions - northern or southern state
        • Selection of site by Olympic committee - Asia, Europe, North America or South America
  • Sway Process
    •  U = {1 Blue, 1 Red}
    • Process
      • Select and return 
      • In period t, add a ball of the same color as the selected ball and add 2^(t-s) - 2(t-s-1) of color chosen in each period s < t
    • As you go back in time,the older events take on exponentially more weight over time
    • Early movers have a bigger effect
  • Distinguish between:
    • Path Dependent Outcomes
      • color of ball in a given period depends on the path
    • Path Dependent Equilibrium
      • percentage of red balls in long run depends on the path
  • Outcomes and equilibrium
    • Polya process: 
      • Path-dependent outcomes
      • Path-dependent equilibria
    • Balancing process: 
      • Path dependent outcomes
      • Equilibria independent of path
  • Examples of path-independent equilibria
    • Manifest Destiny - America will stretch from sea to shining sea
    • Railroads - Once railroads were invented, they will build themselves
    • Mobile - Once invented, mobiles is the future

Path Dependence and Chaos

  • Why is the difference between Path Dependence and Phat Dependence important
  • Markov processes
    • finite states
    • fixed transition probabilities
    • can get to any other state
    • not simple cycle
    • markov converges to a unique stochastic equilibrium
  • Chaos
    • Extreme Sensitivity to Initial Conditions (ESTIC)
    • If initial points x and x' differ by even a tiny amount after many iterations of the outcome function, they differ by arbitraty amounts.
  • Tent Map (an example of chaotic)
    • x in (0,1)
    • F(x) = 2x   if X <0.5,
    •         = 2 - 2x if X > 0.5
  • Tent Map is not path dependent
    • Nothing happens along the way/path will change the end
    • is deterministic
  • Path dependence means what happens along the way has an impact on the outcome
Types of outcomes
  • Independent
    • Outcome doesn't depend on starting point or what happens along the way
  • Chaotic
    • Outcome depends on initial conditions
  • Path dependent
    • Outcome probabilities depend upon sequence of past outcomes
  • Phat dependent 
    • Outcome probabilities depend upon past outcomes but not their order
History is path dependent. The future is being written today.
  • History/future is not independent i.e. what's happening now is happening regardless of what happened in the past. Independence means no structure.
  • History/future is not chaotic i.e. initial conditions matter but it isn't the only thing that matter. Once we write the Constitution, the rest plays out deterministically
  • History/future is path dependent not phat dependent because early events have a larger importance.

Path Dependence and Increasing Returns

  • Increasing Returns
    • More produces more
    • Positive feedback / Virtuous cycles
    • The more I have of something, the more I want the same thing 
    • The the more other people do something, the more that other people will do it
  • Example:
    • The more people get QWERTY typewriters, the more people will get QWERTY typewriters
  • Is increasing returns equivalent to path dependent equilibrium? No
    • Increasing returns without path dependent equilibrium
      • Example:
        • Gas / Electric
        • Always goes to equilibrium at Gas even though there is increasing returns
    • Path dependent equilibrium without increasing returns
      • Example
      • Symbiots
  • Path Dependencies comes from a different process - Externalities
    • Externalities:
      • interdependence between choices can create path dependence
    • Decisions create externalities
    • Externalities that big projects create path dependence
      • Choosing Project A first results in choosing Project C next
      • Choosing Project B first results in choosing Project D next
    • Yi J's decision to migrate to Australia affects parents & Dai J

Path Dependence or Tipping Point

  • Path Dependent Equilibrium
    • percentage of red balls in the long run depends on the path
  • Tipping points
    • direct tips
  • Comparison
    • Tipping points
      • a single instance in time where the long term equilibrium
      • a singular event that tips the event abruptly
      • diversity index - count of equilibria
        • diversity index (uncertainly) is reduced abruptly
      • entropy - how much information in the system
    • Path Dependent Equilibrium
      • accumulative effect of moving along the path
      • diversity index reduces gradually
        • unlike tipping point where diversity index (uncertainly) is reduced abruptly

Key Lessons

  • Externalities are the reason choices we make in the past will affect choices we make in the future
  • Pay more attention to choices with externalities e.g.
    • Where you choose to live
    • What line of work you choose to do
    • What language you choose to learn
  • Where possible make decisions where externalities are all positive 
    • including future externalities
    • this will reduce path dependencies i.e. keep your options open
  • History matters when it changes transition probabilities
    • Make decisions that increase transition probabilities to states you desire - to goal states
  • Pay attention to externalities when making decision especially negative externalities
    • Keep your options open

Friday, July 26, 2013

The Power of Complements

The Power of Complements

In this week's lecture:
  • Examples and definition of complementary products
  • The economic definition for complementary products
  • Cross-price elasticity of complementary products
  • How substitute goods can also be surprising complements
  • Interesting strategies in markets with complementary products
    • Supporting the supplier of a complementary product
    • Produce the complements - Advantages and disadvantages
  • Strategies for firms that produce the complements
    • Cross subsidize complementary products
    • Bundle complementary products
    • Increase Lock-In
  • How complementarity can help achieve cooperation among firms who might otherwise compete
    • Competitors as Complementors
    • How Strategic Partnerships foster coordination between firms
      • Shared decision making
      • Organisation Integration
      • Economic Integration

Complementary Products

Examples of complementary products:
  • Computers and Software
  • Skis & Skiing Sticks
  • Smartphones & Apps
 

Economic Definition

The utility increase when the products are used together.
  • Two products A and B
  • These are complements if B increases users' utility from A, and vice versa
  • U(A+B) > U(A) + U(B)

Cross-Price Elasticity

  • Two products A and B
  • These are complements if the demand for B increases when the price of A drops, and vice versa
  • This phenomenon is referred to as negative cross price elasticity
  • Cross price elasticity is how the price of one product depend on the price of another products

Surprising Complements

  • Substitute good can also have complementary effects
  • A price cut of the substitute good decreases market share but increases the size of the market, resulting in a positive net effect
  • Example: Cloth shops in the same mall
    • Shop A's price cut makes the whole mall more attractive
    • Shop B's sales increase due to the additional customers


Supporting the Supplier

  • Enable the supplier in ways that increase sales of complement e.g.:
    • Better quality of complement
    • Higher sales of complement
  • Example: Apple
    • Gave laptops to students writing software for Mac OS
    • More compatible software titles made Apple's laptops more attractive
  • Example: Game console manufacturer 3DO
    • Problem
      • Console manufacturers sold consoles for high prices to make profits
      • This attracted a limited number of customers only
      • Neither optimal for console manufacturers not for game publishers
    • Solution
      • Publishers paid a fee of 3 dollars to 3DO for every game copy sold
      • 3DO could sell consoles much cheaper and attract more customers
      • This way, publishers could sell more copies and increase profits

Producing Complements

  • It may make sense to produce the complement yourself
  • Example
    • Sony produces game console and video games
    • Hewlett Packard manufactures printers and printing ink
  • Contra
    • Market for complements may simply be unattractive
    • Complement may require competencies the firm lacks (production, R&D, management, ...)
    • Prospective customers might be put off by a firm's dominant position
  • Pro
    • Better tailoring of complement to own product
    • Quality control for complement
    • Internalization of the positive effects (externalities) of the complement on own product
      • Cross-Subsidies
      • Bundling
      • Increasing Lock-in

Cross Subsidies

  • Idea
    • Product A is sold at small margins (even loss) to increase sales of Product B (high margins)
  • Advantage
    • Increase profits through intelligent pricing
  • Risks
    • Consumers do not buy product B at all
    • Consumers buy product B from another manufacturer
  • Examples
    • Razors and razor blades
    • Printers and printer cartridges
    • Mobile phones & operator contracts

Bundling

  • Idea
    • Firm sells product A and complement B combined as a package
  • Advantage
    • Little or no competition in market for A
    • Decreased competition in market for B
  • Risks
    • Potential buyers of "A only" or "B only" are lost
    • Bundling becomes standard and advantages of unbundling are overlooked
      • e.g. How to differentiate and how to set prices
  • Examples
    • Game console and games 
      • e.g. Wii bundle with console, game, steering wheel
    • Operating system and web browser
      • Flight and baggage handling

Increasing Lock-In

  • Idea
    • Users have switching costs when switching from A to a substitute
    • The more complements (B, C, ...) to A they buy, the higher the switching cost
  • Advantage
    • Higher switching costs imply a higher value of the customer to the firm
    • You can charge customers higher prices
  • Examples
    • Microsoft Office and MS Windows
    • Games and video consoles

Competitors as Competitors

  • In certain situations, firms may be
    • Competitors in one part of the market
    • Complementors in another part of the market
  • In such a constellation, they may not compete that harshly
  • Example: Music Players & Music Content
    • Sony and Apple
    • Competitors
      • Both sell portable music players
    • Complementors
      • Sony Music provides music content for Apple's iPod / iPhone
      • Apple's iTunes store is important sales platform for Sony's music content
  • Example: Mobile Phone Calls
    • Vodafone and T-Mobile
    • Competitors
      • Both sell mobile phone contracts
    • Complementors
      • Their networks are interlinked
      • Customers join Vodafone because they know that they can also call T-Mobile customers , and vice versa.
      • Parts of Vodafone's / T-Mobile's revenues come from these cross-network calls

Strategic Partnerships

  • Drivers of Strategic Partnerships
    • Producers of complementary goods depend on each other
    • Helping each other and coordinating each other's behaviour maximizes the positive effects of complementarity
    • In many cases, integration into one single company not feasible or not desired by involved firms
    • Forming a strategic partnership is a powerful way of institutionalizing coordination and formalising interests
  • Definition of Strategic Partnerships
    • Relationships between firms
    • Typical characteristics
      • Shared decision making
      • Organizational linkages & coordination mechanisms(organisational integration)
      • Joint equity ownership (economic integration)
  • Organisational Integration
    • Teams across firms
    • Established reporting and decision routines across firms
    • Heavy exchange of information
  • Economic Integration
    • Direct cross ownership of equity
    • Firm A holds X% of Firm B's assets and vice versa
    • Setting up a new legal entity (joint venture)
    • Benefits
      • Alignment of interests
      • Retention of control and exclusivity
      • Feasibility of inter-organisational coordination
  • Complementarity and Strategic Partnerships
    • If firms produce complementary products, already high incentives to work together cooperatively
    • Less need for economic integration to align interests

Beyond Creative Programming Course

Next steps after Creative Programming Course:
  1. Develop Mandelbrot Surfer
  2. Read the Nature of Code
  3. Develop Shoot the Apple Game
  4. Develop a site like http://funprogramming.org/ (they key being graduated exercises)
  5. Checkout Processing.js on Windows 8

Social Sharing Programmatically

Sharing on Social media
  • Tumblr: http://stackoverflow.com/questions/6169603/tumblr-sharer-url-override
A good source of information on Tumblr
  • http://www.cherrybam.com/tumblr-tutorials.php