Answered step by step
Verified Expert Solution
Question
1 Approved Answer
An important form of Zapf's law is the citation patterns found in scientific articles. Rather than doing equations, let's make a simulation of a simplified
An important form of Zapf's law is the citation patterns found in scientific articles. Rather than doing equations, let's make a simulation of a simplified version of this. Start with a list containing the integers 1 and 2. Choose one number randomly from the list and append it back to the list. You can use the sample () function from the random module to do this. Append the next number (3) to the list. Repeat these last two steps 1,000 times, incrementing the new number each time until you get a list of 2,002 integers. Now, count up how many times each integer appears in the list and plot a rank-value plot on a log-log scale. Explain how we know that the plot exhibits a power-law scaling, and approximate the scaling exponent. An important form of Zapf's law is the citation patterns found in scientific articles. Rather than doing equations, let's make a simulation of a simplified version of this. Start with a list containing the integers 1 and 2. Choose one number randomly from the list and append it back to the list. You can use the sample () function from the random module to do this. Append the next number (3) to the list. Repeat these last two steps 1,000 times, incrementing the new number each time until you get a list of 2,002 integers. Now, count up how many times each integer appears in the list and plot a rank-value plot on a log-log scale. Explain how we know that the plot exhibits a power-law scaling, and approximate the scaling exponent
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started